From: viisi@... (Andreas Riedl) Date: 2001-05-19T01:11:24+09:00 Subject: [ruby-talk:15371] Re: how to use garbage collection relyably? >|how is garbage collection intended to be used? >| >|is >| >| VALUE x = rb_ary_new(); >| VALUE y = rb_ary_new(); >| >|ensured to work correctly? > > Yes. Ruby uses conservative garbage collection technology. > You don't have to worry about C local variables (well, except some > rare cases). ah nifty, i see now! 'rb_gc()' scans stack frames for (possible) pointers to allocated ruby objects. thus only static and dynamic 'VALUE's have to be handled manually to be preserved from garbage collection... ciao, andi