c# - Finding Unmanaged Memory Leak in .NET Application -
i have created application reads file , fetches meta data of file. when launch application private working set around 8mb (as viewed in task manager). when scan file, memory shoots 150mb , stays there. if add additional file using same instance of application memory piles on. understand behavior, used memory profiler (red gates) showed me following statistics :-
out of 150mb of private worker set memory
- unmanaged memory :94mb
- others resources (string,array etc) : 30mb
this puzzles me not using un-managed code nor pinvoke calls. have tried gc.collect() without success.
can please guide me how can reduce unmanaged memory usage of application , possible causes same.
thanks in advance
a recent update ants shows .net classes application's unmanaged memory used by. after enabling unmanaged memory profiling in setup screen, navigate class list , sort new 'unmanaged size' column.
though may not have knowingly used unmanaged memory, many .net framework libraries use native resources - example imaging libraries.
Comments
Post a Comment