From: Max Lapshin Date: 2006-10-24T15:04:25+09:00 Subject: Re: Ruby's garbage collector... > There's a claim that you can never make a "perfect" garbage > collector. In > other words, there will always exist (pathological) conditions > where your > collection strategy will fail to find inaccessible objects. Conservative garbage collectors can leave some unused data if it seems to look like used object, however, ruby garbage collector can leave objects, that have references from current stack. So, after some calls, stack will change and unused objects will leave. I don't know, what are this ideas (about impossibility of perfect collector) are based on. > Furthermore, according to some, Java (a friendly Ruby > competitor) is > incapable of collecting, specifically, circular references. I was > just > wondering if Ruby had the same limitation? No, Ruby doesn't have this limitation and Sun Java machine (I don't know about others) doesn't have such limitation. Old Microsoft Java machine had this limitation, because it used only reference counting. CORBA libraries have this limitation because of reference counting. Python will not reclaim objects in circle with defined __del__ method. As ruby objects have no destructors (finalizators), Ruby has no such problems.