我的.NET应用程序中存在内存泄漏。与此同时,我知道哪些物体泄露了。但是应该没有提及它。我怎样才能找到参考文件?哪种工具适合它?
答案 0 :(得分:2)
I appreciate you like to learn how things work under the hood. This should give you a starting point:
.loadby sos clr
(for .NET 4.x, else see here)!dumpheap -type MyType
!gcroot
to see whether the object has root references or not.For specific problems, ask questions using sos and windbg tags.
答案 1 :(得分:1)
我建议使用红门ANTS内存分析器并查看Walkthrough: Using ANTS Memory Profiler to track down a memory leak