From: Chuck Remes Date: 2010-08-18T23:22:58+09:00 Subject: Re: Ruby GC question (MRI, JRuby, etc) On Aug 18, 2010, at 8:58 AM, Robert Klemme wrote: > 2010/8/17 Chuck Remes : >> My basic understanding of the garbage collectors in use by the various Ruby runtimes is >> that they all search for objects from a "root" memory object. If an object cannot be reached >> from this root, then it is collected. > > There is a small error in the wording above. While the issue has been > explained already I want to stress this point because this is a > mistake many new to GC make and it explains some weird effects that > special tests show. It should have read > > If an object cannot be reached from this root, then it _can be_ collected. > > Small change, big difference. :-) Ha! Yes, quite true. Depending upon the GC algo in use, some objects may never be collected even though they are eligible for collection. cr