From: Jeff Davis Date: 2008-07-08T15:02:58+09:00 Subject: Re: mysterious memory corruption, very confused On Tue, 2008-07-08 at 01:36 +0900, Tim Pease wrote: > I am wondering why the strings (returned from rb_obj_as_string) will > be garbage collected but the array will not be garbage collected? Both > have the same local scope, and they are not referenced by any other > ruby object. > Thanks for mentioning that, I had the same question. Also, what *exactly* can I do between: x = rb_obj_as_string(y) and a statement that makes "x" safe (e.g. stores a reference in some other value that's safe from collection)? In other words, what ruby routines might invoke the garbage collector, and thus possibly destroy any un-saved objects that I might have? Regards, Jeff Davis