We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Finalization and disposition in .NET

Formal Metadata

Title
Finalization and disposition in .NET
Subtitle
Or how to kill poor, helpless objects efficiently and effectively
Alternative Title
Back to basics: Finalization and disposition in .NET
Title of Series
Number of Parts
170
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
A solid understanding of object end-of-lifecycle handling is necessary for achieving efficient memory use in .NET. Unfortunately, the official documentation on the topic is somewhat fragmented and targeted at developers from historically relevant backgrounds, leaving an increasingly large proportion of new .NET developers to flounder in some rather murky waters. This session will examine how to best design for object end-of-lifecycle in .NET, including such concerns as: Why do we have both finalizers and IDisposable? How are they meant to interact? When should you implement a finalizer? (Probably much less often than you might think!) When should you implement IDisposable? What are the recommended implementation patterns for both finalization and disposition? What are the recommended patterns for consumption of disposable objects?