In our ASP.NET web application, we are experiencing a fairly extensive memory leak, which I am studying right now. Using WinDbg, I got to the largest memory eaters in our application, which (ran !dumpheap -statin the WinDbg console to get them):
MethodTable Addr Count Overall size Type
...
000007fee8306e10 212928 25551360 System.Web.UI.LiteralControl
000007feebf44748 705231 96776168 System.Object[]
000007fee838fd18 4394539 140625248 System.Web.Caching.CacheDependency+DepFileInfo
000007fee838e678 4394614 210941472 System.Web.FileMonitorTarget
000007feebf567b0 18259 267524784 System.Collections.Hashtable+bucket[]
00000000024897c0 1863 315249528 Free
000007feebf56cd0 14315 735545880 System.Byte[]
000007feebf4ec90 1293939 1532855608 System.String
For everyone, I know that a large number of objects Stringcan be quite normal; there is still some room for improvement. But what really makes me itchy is the count of objects System.Web.FileMonitorTarget: we have more than 4 million copies on the heap (48 bytes)! Using two memory dumps and comparing them, I found that these objects are not cleared by the GC.
, , : ? ANTS Memory Profiler, , . System.Web.Caching.CacheDependency+DepFileInfo , , System.Web.Cache, , .
, 14315 System.Byte[], 700 , - , Byte[], - , 30 .
Byte FileMonitorTarget ? !
P.S. - , "" .