Suppose the object has a Finalize() method.
When it is created first, a pointer is added to the finalization queue.
The object has no links.
When garbage collection occurs, it moves the link from the finalization queue to the f-reachable queue, and the thread starts to run the Finalize method (sequentially after the methods of other Finalize objects).
So, now the object (after resurrection) has only one root, which is a pointer from the queue available to f.
At the moment, is the object added to the next generation?
source share