Garbage collection in .net has two aspects: termination and destruction. When an object that has a finalizer is created, it is added to a special list, which I will call the list "finalizable". Each time the garbage collector starts, it identifies objects that are not reachable by anything, those that are reachable only from the "finalizable" list or objects in it, and those that are reachable by something else without going through the "finalizable" list. Objects that are not reachable at all are destroyed. Those that are available only from the "finalized" list or objects in it are removed from this list and placed in the "finalize-now" list. Objects that are reachable by something other than a "finalized" list survive in the GC. Although the GC sorts objects into these three categories, all code execution stops. Once the GC is complete, code execution resumes, and a special thread starts the Finalize method for all objects in the "Finish Now" list.
Please note that the objects in the "finish now" list, as well as any objects to which they refer, will not collect garbage if they are in this list; they may be eligible for garbage collection after the finalizer starts. Once they are no longer on the finalize now list, they may again be eligible to collect.
source share