0

Thanks to Jeffrey for the fantastic one, http://msdn.microsoft.com/en-us/magazine/bb985010.aspx

"The garbage collector scans the finalization queue looking for pointers to these objects. When a pointer is found, the pointer is removed from the finalization queue and appended to the freachable queue (pronounced "F-reachable")."

From the above the objects J,I,E are moved from Finalization Queue to fReachable Queue.

Im not clear about the transition of Finalization Queue to fReachable Queue.

What about the FIFO logic of Queue. How dequeue of object E done without dequeuing F?

Whether it is a Finalization Queue or Finalization list?

Kindly shed some light.

C-va
  • 2,910
  • 4
  • 27
  • 42

1 Answers1

4

Despite the word "queue" in the phrases "finalization queue" and "freachable queue", one should not make any assumptions about the sequence in which objects in those collections should be processed. I would think the term "finalizable list" would be more descriptive; the only reason I can think of for calling it a "queue" would be if the garbage collector, after identifying large objects, starts a new finalization queue and then visits each entry in the one one; each entry then gets discarded (if the finalizer has been suppressed), added to the new finalization queue (if the object had been tagged for retention), or added to the freachable queue (if the object had not yet been tagged for retention).

supercat
  • 77,689
  • 9
  • 166
  • 211