From: "Florian G. Pflug" Date: 2001-08-13T08:36:34+09:00 Subject: [ruby-talk:19620] Re: Forced garbage collection On Mon, Aug 13, 2001 at 02:22:55AM +0900, jweirich@one.net wrote: > >>>>> "Florian" == Florian G Pflug writes: > > Florian> I think this is because: > Florian> .) Block are "true closures". This means the remeber the > Florian> context in which they were created. > > [...] > > Florian> This is a sort of deadlock, which ruby seems to overcome > Florian> by not calling the finalizer... > > I suspect that it is not so much that it is a deadlock situation, but > that the object never becomes a candidate for collection because a > reference to the object still exists ... the reference in the block. Well.. but on the other hand, why isn't the block collected, and then the object? Because the block is needed, when the object is destructed. This seems to be a kind of "circular dependency" - or in other words a deadlock. I noticed that this is the kind of situation that reference-counting-gcs always have trouble with. The ruby mark-and-sweep gc normally avoids this kind of trouble - but it seems that in this particular case, it still fails. greetings, Florian Pflug