Yet another good explanation on the pitfalls of Finalization

Brian Grunkmeyer has written a rather deep article for the BCL weblog that discusses many of the pitfalls that surround finalization, dispose, and weird things that can happen during the birth, death, and possible resurrection of an object:

 http://blogs.msdn.com/bclteam/archive/2007/10/30/dispose-pattern-and-object-lifetime-brian-grunkemeyer.aspx

 Some of the important points he covers:

. What happens if an object's constructor thorws an exception?

. What happens if an object's finalizer is called as part of an AppDomain unloading?

. Why should I care?

. What can I do to prevent exceptions and application terminations?

Created: 11/2/2007 11:35:00 AM

Current Projects

I create content for .NET Core. My work appears in the .NET Core documentation site. I'm primarily responsible for the section that will help you learn C#.

All of these projects are Open Source (using the Creative Commons license for content, and the MIT license for code). If you would like to contribute, visit our GitHub Repository. Or, if you have questions, comments, or ideas for improvement, please create an issue for us.

I'm also the president of Humanitarian Toolbox. We build Open Source software that supports Humanitarian Disaster Relief efforts. We'd appreciate any help you can give to our projects. Look at our GitHub home page to see a list of our current projects. See what interests you, and dive in.

Or, if you have a group of volunteers, talk to us about hosting a codeathon event.