#940 – Finalizers Are Called when an Application Shuts Down

A finalizer is an override of the System.Object.Finalize method that you implement using the destructor syntax.  The finalizer is called automatically by the garbage collector, before it releases memory for the object.

Finalizers are also called when an application shuts down.  Before the application shuts down, the finalizers of any objects that still exist on the managed heap are called.  Note that this is only true if the application shuts down in a controlled manner.  If the application crashes, the finalizers will not be called.

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

One Response to #940 – Finalizers Are Called when an Application Shuts Down

  1. Pingback: Dew Drop – September 27, 2013 (#1,633) | Morning Dew

Leave a comment