Note that the GC kicks in when there are certain managed heap thresholds
reached, not when the system feels it has no more resources.
The thresholds vary largely between CLR versions (Workstation,Server) and GC
versions (concurrent, pre-emptive) and also between releases (v1.x, v2.0),
and they are dynamically adapting according the usage pattern. For instance,
the threshold decreases with an increasing allocation frequency (more
collections), but this is not the sole criterion to adapt the threshold
levels. In general one can say that the gen0 (this is the place where all,
except the large objects, start their life) threshold stay's below 1Mb on
v1.x and below 3Mb for v2.0.
The same applies to gen1 and gen2, of course the thresholds are getting
larger for each older generation.
Willy.
"Tamas Demjen" <td*****@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
It will be garbage collected when the system feels it has no more
resources. It may never happen. You have no control about that.
There's a way to enforce garbage collection (GC::Collect()), but you're
not supposed to do that. Let the system make its own decision.
Tom
cm****@yahoo.com wrote: and.... car2 = nullptr
... doesn't work either
'cause it does not mark the object for garbage collection :-((
Any other posibillities ?
thanks
Chris