From: Will Pugh Date: 2006-10-24T14:38:58+09:00 Subject: Re: Ruby's garbage collector... I do not know much about the Ruby Garbage collector, but I know Java can easily collect circular references. Most modern Java VMs use Generational garbage collection. The only "garbage collection" technique I can think of right now that fails to collect circular references is ref counting. I'd be interested in hearing about what kind of "pathalogical" conditions you are talking about, but my guess is that they do not actually prevent collection of inaccessible objects. Normally, they either increase response time or create additional memory overhead. The claim that "there is no perfect garbage collector" can be generalized to "there is no perfect general allocation model". Any memory allocation contains a host of trade offs. Java is actually pretty advanced in a number of these, if you look at either the JRockit VM or the more modern Sun VMs. --Will Just Another Victim of the Ambient Morality wrote: > Is there a name for Ruby's garbage collecting strategy? > I'm on a web forum and the topic of garbage collection came up. > 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. At least, > that's my best understanding of the claim and it strikes me as... false. I > can understand that the task is non-trivial but simply impossible? Can > that be right? > 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? > Thank you... > > > >