Finalize

Finalize is a class-only method that is automatically called when an object is destroyed by the garbage collector. The Finalize method is primarily used to free up unmanaged resources allocated by the object before the object itself is removed from memory. A Finalize method is not needed when only managed resources are used by the object, which are automatically freed by the garbage collector. In C#, when a destructor is defined in a class it is mapped to a Finalize method. Also called a finalizer.