In answering another question* on SO, and the subsequent comment discussion, I ran into a wall on a point that I\'m not clear on.
Correct me on any point where I\'m
It's simplest to think of the garbage collector as dividing objects into four groups:
When the garbage-collector runs, objects of type #1 disappear. Objects of #2 get added to a list of objects needing imminent finalization and removed from the "live finalizable objects" list (thus becoming objects of category #4). Note that the list of objects needing finalization is a normal rooted reference, so objects on this list cannot be collected while they are on it, but if no other rooted reference is created by the time the finalizer is complete the object will move to category #1.