Garbage collection

  • Thread starter Thread starter Alan T
  • Start date Start date
A

Alan T

What is the frequency the garbage collector to clear the non-referenced
memory?
eg. every minute?
 
What is the frequency the garbage collector to clear the non-referenced
memory?
eg. every minute?

There's no set frequency. It collects garbage when it needs to due to
"memory pressure".
 
And if there isn't sufficient memory pressure, then no collection takes
place. This means that de-referenced objects could remain in memory for
extended periods, which is why calling Dispose on objects that use unmanaged
resources is so important.

-Scott
 

Ask a Question

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.

Ask a Question

Back
Top