From: Eric Hodel Date: 2011-02-09T09:59:26+09:00 Subject: Re: C extension: How to check if a VALUE is still alive (not being GC'ed)? On Feb 8, 2011, at 4:29 PM, Iņaki Baz Castillo wrote: > 2011/2/9 Eric Hodel : >>> Then... why do I need a mark callback? Maybe I miss something, however >>> Itested my code under high load and doesn't seem to leak. >>> Thanks a lot. >> >> Since you use the instance variable you do not need the mark callback. The mark callback is only required if you are storing ruby objects in a structure that hides them from ruby. > > Ok. So if for example my class stores some VALUE objects in a pure C > array, and these objects are not referenced at Ruby level, then I must > mark them. If not, Ruby GC could remove them from memory at any time, > am I right? > > Thanks a lot. Correct.