#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.

Advertisements

About Sean
Software developer in the Twin Cities area, passionate about .NET technologies. Equally passionate about my own personal projects related to family history and preservation of family stories and photos.

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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: