Wednesday, October 16, 2019

How to detect and avoid memory and resources leaks in .NET applications

https://docs.microsoft.com/en-us/previous-versions/ee658248(v=msdn.10)?redirectedfrom=MSDN

Let's review the usual culprits I've identified:
  • Static references
  • Event with missing unsubscription
  • Static event with missing unsubscription
  • Dispose method not invoked
  • Incomplete Dispose method
In addition to these classical traps, here are other more specific problem sources:
  • Windows Forms: BindingSource misused
  • CAB: missing Remove call on WorkItem

No comments:

Post a Comment