Röck Yoür Cöde: Everything That Every .NET Developer Needs to Know About Disposable Types
summary
Claim: misused disposables are the number one cause of .NET virtual memory leaks in real production code — one audit finds over 600 missing dispose calls, 90 broken IDisposable types and ~2,000 code touchpoints to fix. Shows the concrete pattern: implement Dispose(bool), call Dispose() and GC.SuppressFinalize, avoid disposables in static fields, prefer the using statement and never inline new for disposables. Recommends tools: IDisposable analyzers NuGet and a memory profiler (SciTech .NET Memory Profiler) plus small helpers like DisposeFields/DisposeCollection.
AI-written summary · about
chapters (16)
- 0:00Start
- 2:02Code Performance
- 8:43Virtual Memory Leaks
- 12:54Memory Handling
- 14:31The Memory Heap
- 19:21Garbage Collector
- 35:35Disposed Methods
- 37:15Public Dispose Method
- 40:39Future Proofing
- 42:22Try Dispose
- 45:46Sonarlint
- 49:09Memory Profiling
- 51:39Profile Your Code
- 57:14Memory Profiler
- 58:32Avoid Static Fields
- 1:00:36Resources
related talks
53mDebugging .NET Apps
01h 15mCSI .NET – Debugging .NET Applications
58mManual memory management in .NET Framework
01h 05mLook Mommy, No GC!
57mMake your custom .NET GC — "whys" and "hows"
47mHow We Found a 2 GB/Day Leak in 5 Minutes – dotMemory Meets Akka.NET
31mSmall things we got wrong in .NET
53mDeep .NET Debugging
