title: Visual Studio diagnostic tools not displaying process memory
body: <p>I have a VB.NET app (with C# libraries) which is consuming large amounts of memory over time. Ultimately the application runs out of memory. I am cautious about using the term <em>leaking</em> because the GC shouldn't allow a memory leak, but perhaps there is a large .NET object somewhere. If so I need to identify it.</p>
  
  <p>However I do have a reference to a 3rd party ActiveX control library (.ocx) of which I use some controls and make numerous calls retrieving laser beam profile data. Memory usage increases only when I run a loop retrieving the laser beam profile data from the ocx. I suspect the ocx but need to know for sure before contacting the vendor.</p>
  
  <p>I debugged my application in Visual Studio 2017, Diagnostic Tools with <em>Memory Tools</em> enabled, and option <em>Memory Enable native heap profiling with snapshots</em> enabled.</p>
  
  <p>My issue is I don't see the massive amount of memory in the graph at all in the Memory Usage tab of diagnostic tools. After 30 minutes my application is at around 2GB and being an x86 application, this is a problem - regardless of cpu architecture really. Maybe I'm looking at the wrong thing.</p>
  
  <p>So what am I doing wrong to find the memory issue? How can I find the offending objects?</p>
  
  <p><a href="https://i.stack.imgur.com/PQLN1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PQLN1.png" alt="enter image description here"></a></p>
  
  <p><strong>Update 1</strong></p>
  
  <p>I ran the Performance Profiler and did not see any increase in memory as seen with diagnostic tools. Task manager also confirms that no memory leak is present when running with Performance Profiling. Running without profiling afterwards shows a memory leak again.</p>
  
  <p><a href="https://i.stack.imgur.com/RCXZN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RCXZN.png" alt="enter image description here"></a></p>