Well, there's a lot of garbage out there...<g> No, seriously though, what is
it you want to achieve? When you kick off a .NET application, garbage
collection IS running.
If you open up perfmon - the under the .Net CLR memory - add the counters for Gen X collections and select the process you want to monitor
This give you the absolute number of collections at a moment in time for each generation of the heap. GCs are triggered by memory pressure so an app that is not allocating memory will not cause any GCs.
Great feedback. However, my point is that the CLR will administer and
monitor any .NET app started, hence the garbage collector "is running", i.e.
it's invoked when needed.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.