我正在调查PerfMon和WinDbg的内存泄漏问题.我注意到'大内存堆'计数器从10MB增加到37MB.强制GC后,它只能减少到28MB.

(无论我多少次重复操作(创建/销毁),在GC之后,大对象堆稳定在28MB).
我想知道哪些对象导致泄漏问题,所以我使用'!Dumpheap -min 85000'命令运行WinDbg.捕获了两个快照,第一个是在内存泄漏之前完成的; 第二个是内存泄漏后:
之前:
MT Count TotalSize Class Name
6f39fb08 1 89024 System.String
6f3a4aa0 1 107336 System.Byte[]
6f356d84 2 262176 System.Object[]
00360e4c 1 350392 System.Collections.Generic.Dictionary`2+Entry[Int64,Int32][]
6f3a2a94 3 592584 System.Int32[]
00360c24 1 727072 System.Collections.Generic.Dictionary`2+Entry[String,Int64][]
0bc78b34 4 2754488 System.Collections.Generic.Dictionary`2+Entry[Int64, AccountNode][]
00730260 10 5375572 Free
Run Code Online (Sandbox Code Playgroud)
后:
MT Count TotalSize Class Name
6f39fb08 1 89024 System.String
6f3a4aa0 1 107336 System.Byte[]
6f3a55d8 2 202080 System.Collections.Hashtable+bucket[]
6f356d84 2 262176 System.Object[]
00360e4c 1 350392 System.Collections.Generic.Dictionary`2+Entry[Int64,Int32][]
00360c24 1 727072 System.Collections.Generic.Dictionary`2+Entry[String,Int64][]
6f3a2a94 4 738008 System.Int32[]
6cf02838 …Run Code Online (Sandbox Code Playgroud)