From: Ara.T.Howard@... Date: 2005-05-17T08:50:30+09:00 Subject: Re: rb_gc_mark question On Mon, 16 May 2005, Charles Mills wrote: > You shoud just not call rb_gc_mark at all. Not sure if it even matters, but > it is possible that objects you mark using rb_gc_mark outside of a mark and > sweep cycle will hang around AFTER some of there fields have been GCed - > like an array whose elements have been GCed, but is still -alive-. This > will only happen if the stack does not overflow when marking and the only > way this could be a problem is by using the object space API. right - so it should only be called from a mark function passed to Data_Wrap_Struct or something like that. which is to say only ruby should call it... is this correct? > Anyway, hopefully whoever wrote this code hopefully wasn't modivated by my > overly paranoid/incorrect past posts about the Ruby GC. lol. i'll have to go back and read them! > Also you could use rb_ary_new2 to save ruby from having to resize the array > since you know the size ahead of time. thanks. cheers. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | renunciation is not getting rid of the things of this world, but accepting | that they pass away. --aitken roshi ===============================================================================