GC time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

When exactly the GC starts collecting garbage?? (other than invoking the
Dispose method)
 
Hi,

Calling Dispose does not invoke the GC. The GC is invoked when an a
reference type is created with the new operator and there is not a
contiguous chunk of memory big enough for that object. GC.Collect will
invoke the GC as well. See the following article for more details.

http://msdn.microsoft.com/msdnmag/issues/1100/gci/

Brian
 
Hello VBA,

1) When u call Collect method
2) When the threshold of GC is overcome

There is a 3rd case when GC starts working but can't remember

V> When exactly the GC starts collecting garbage?? (other than invoking
V> the Dispose method)

---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
 

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