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
 
Back
Top