What are the most common (and often overlooked) causes of memory leaks in managed (.net) applications?

后端 未结 11 956
闹比i
闹比i 2021-02-04 09:32

Please can anyone recommend a quick checklist / best practice guide to help us avoid simple (but subtle) mistakes that cause could cause memory leaks in .net apps

I find

11条回答
  •  北海茫月
    2021-02-04 10:03

    Following are the main reason of memory leak.

    1. Holding references to managed objects (classic case of event handler not released.)
    2. Failing to release unmanaged resources
    3. Failing to dispose Drawing objects
    4. I have noticed timer also causes the memory leak. Do dispose it if you are using any of the timer.

    please read further on http://blogs.msdn.com/b/davidklinems/archive/2005/11/16/three-common-causes-of-memory-leaks-in-managed-applications.aspx

提交回复
热议问题