Disposing and Finalizing Objects
This module explains how the .NET runtime deals with objects that have a finalizer, and introduces the disposable object pattern.
Lesson Preview
We introduce .NET finalizers as the counterpart to C++ destructors, explaining their syntax, purpose, and how they allow objects to clean up unmanaged resources such as operating system handles before being removed from memory.
Lessons
- Using Object Finalizers Preview 4 min
- Finalization on the Heap 8 min
- Finalizer Performance and Ordering 11 min
- Finalizer Reliability 8 min
- Demo: Benchmarking Finalized Objects (part 1) 7 min
- Demo: Benchmarking Finalized Objects (part 2) 6 min
- Using Disposable Objects 7 min
- The Dispose Pattern 4 min
- The Dispose Pattern: Using Blocks 6 min
- Demo: Benchmarking Disposable Objects 10 min
- Disposable Objects Recap 2 min