~/talk

Röck Yoür Cöde: Everything That Every .NET Developer Needs to Know About Disposable Types

Talkat Code Quality Conference 2022 · on Wednesday, 2022-08-24· [dotnet]
slides:none on file

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

  1. 0:00Start
  2. 2:02Code Performance
  3. 8:43Virtual Memory Leaks
  4. 12:54Memory Handling
  5. 14:31The Memory Heap
  6. 19:21Garbage Collector
  7. 35:35Disposed Methods
  8. 37:15Public Dispose Method
  9. 40:39Future Proofing
  10. 42:22Try Dispose
  11. 45:46Sonarlint
  12. 49:09Memory Profiling
  13. 51:39Profile Your Code
  14. 57:14Memory Profiler
  15. 58:32Avoid Static Fields
  16. 1:00:36Resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.