Immediate closing of iterators

Lars T Hansen lth at acm.org
Thu Dec 21 19:50:54 PST 2006


Chris Hansen writes:

> Also, having finalization will mandate a non-conservative GC.

I assume you're trying to guarantee that the finalizer is run once the
object becomes garbage.  But non-conservative generational GCs in general
do not make any guarantees about the promptness of collection of any
particular object, thus also do not guarantee anything about the running
of finalizers.  A generational GC that maintains an set of independently
collectable generations and guesses which ones of them are the best to
collect may never collect particular generations if it believes those
generations contain very little garbage.  A very quick scan of the work by
Detlefs et al on "Garbage-first" GC suggests that this collector might
behave like that, for example.

--lars




More information about the Es4-discuss mailing list