From: Hugh Sasse Date: 2007-10-03T01:39:35+09:00 Subject: Re: gc.c -- possible logic error? On Wed, 3 Oct 2007, Joel VanderWerf wrote: > Hugh Sasse wrote: > ... > > So a whole load of components of data get marked by the GC, but don't > > get freed in the free function, because only the frame component [...] > > Mark and free are not symmetric. Mark is for objects referred to by self > (which might also be referenced elsewhere); free is for internal data that > can't be directly referenced by other ruby objects. For example, an array's > mark func must mark the objects that are elements of the array (and any > instance vars of the array). The free func releases the storage of the array > itself (the C array of VALUEs), but can't touch the objects because someone > else might still be referring to them. Thanks, that confirms the results of my experiment which failed, and ties the low level aspects into the high level mental model I had. With the tools I have here, I am now at a loss to explore this non-freeing of objects further. I could do basic experiments with 1.9 if I could find it :-) but I've not found the svn/tarball of it from wandering round ruby-lang.org Thank you, Hugh