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

后端 未结 11 960
闹比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 09:44

    I can start to suggest that one should always be aware of IDisposable objects and how to properly dispose them. Also, be very careful with the state in you app. Grab only objects when it's absoluttly necessary. If object A is goind to live for a long period of time in your app, always try not making dependencies between A and other objects.

提交回复
热议问题