If you want to see if an object is in the finalization queue or the f-reachable queue, when you fire off WinDBG, first locate your object, using dumpheap -stat
or any other command. After you find that objects address, you can use the !FinalizeQueue
which will output how many objects are finalizable in each generation, and how many objects are ready for finalization. The former is the finalization queue, the latter is the f-reachable queue.
For example:
0:003> !FinalizeQueue
SyncBlocks to be cleaned up: 0 MTA Interfaces
to be released: 0 STA Interfaces to be released:0
generation 0 has 370 finalizable objects
(0000000000d29030->0000000000d29bc0)
generation 1 has 4 finalizable objects
(0000000000d29010->0000000000d29030)
generation 2 has 8 finalizable objects
(0000000000d28fd0->0000000000d29010)
Ready for finalization 571 objects
(0000000000d29bc0->0000000000d2ad98)
Now, you can see where your objects address space is in.
A great tutorial is available here