Garbage Collection Basics:

When are the objects GCed?

When the garbage collector finds objects that can be reclaimed, it checks each object to determine the object's finalization requirements. If an object implements a finalizer and has not disabled finalization by calling SuppressFinalize, the object is placed in a list of objects marked as ready for finalization. The garbage collector calls the Finalize methods for the objects in this list and removes the entries from the list. This method blocks until all finalizers have run to completion.

Difference between Dispose(true) and Dispose(false)?

Forcing GarbageCollection

Why I need to call WaitForPendingFinalizers?

Suppressing Garbage collection is explained here

Jessica explains all this in one of her articles:

Comments (2)

Skip to main content