Search code examples
c#visual-studiogarbage-collectionvisual-studio-2015

Call garbage collect in visual studio


Is it possible, to say the gc to collect during debugging session via Visual Studio 2015 Enterprise?

I want to observe the memory usage of my application when calling GC.Collect(), but only for some debugging reasing. So calling it from Visual Studio during debugging the app would be very helpful.

Thank you very much!


Solution

  • You can write GC.Collect() in the Immediate Window.