How to detect objects causing memory leaks in .net. Is it possible to detect object causing memory leaks using crash-dumps?
To detect and investigate memory leaks in .NET you have several options:
To use crash dumps in the investigation of memory leaks see this stackoverflow question and this MSDN link.
Having one dump (and if it has been taken properly see this article ) maybe, having multiple dumps most certainly.
What you can do:
assuming your process is .net 4, in the debugger enter
.loadby sos clr
followed by !dumpheap -stat
This will output the count and class name of managed types.
Having multiple dumps will make it easier for your, but certainly not as easy as being able to use a Memory profiler
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.