Working with WinForms
you have to free memory after using gdi objects, event handlers, objects from native code, etc.
In WinForms
I used to remove for example event handlers in the dispose method.
What is the best workaround to prevent memory leaks in Wpf
? Is it the same as in Winforms
using Dispose pattern
? At all, do I have to care about event handlers, gdi objects in Wpf
? What about the runtime created resources(Brushes
, etc)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…