title: Finding Unmanaged Memory Leak in .NET Application
body: <p>I have created an application which reads a file and fetches meta data of the file. When I launch the application the private working set is around 8MB (as viewed in Task Manager). When I scan the file, the memory shoots up to 150MB and stays there. If I add additional file using the same instance of the application the memory piles on. To understand this behavior, I used a memory profiler (Red gates) which showed me the following statistics :-</p>
  
  <p>Out of the 150MB of private worker set memory</p>
  
  <ul>
  <li>Unmanaged Memory :94MB</li>
  <li>Others Resources (string,array etc) : 30MB</li>
  </ul>
  
  <p>This puzzles me as I am not using any un-managed code nor any Pinvoke calls. I have also tried GC.Collect() without success.</p>
  
  <p>Can someone please guide me as to how I can reduce the Unmanaged memory usage of my application and what could be the possible causes for the same.</p>
  
  <p>Thanks in Advance</p>