[DUG] A change in upgrade policy coming from Embarcadero
Jolyon Smith
jsmith at deltics.co.nz
Fri Sep 18 13:30:50 NZST 2009
You might *try* to force a collection but...
1) the advice is you shouldn't.. The GC supposedly works best when left to
its own devices (which then begs the question, why even provide the
*facility* to force it, if it's better not to? Answer: because your
application knows how it uses memory better than the GC can. Not my words,
Microsoft's!)
2) even if you "force" a collection, the GC is able to ignore you if it
thinks it is better off doing so (if you ask for an "optimized" collection -
"Optimized" in this sense means "do it now, or not, whatever works for you
<shrug>").
And when it *does* collect, all the threads in your app are suspended while
it does it's thing, so if you've invested a great deal of time and effort in
paralleling your code, you really should leave the GC alone if you don't
want that parallelism essentially undone.
The GC in .NET has evolved more and more facilities to "configure" and
"tune" it, which again raises the question in my mind... if GC is supposed
to be this great, automated memory management system, why does it need so
much tweaking and tuning?
-----Original Message-----
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
Behalf Of Jeremy North
Sent: Friday, 18 September 2009 12:39 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] A change in upgrade policy coming from Embarcadero
Don't forget that the garbage collection won't actually collect unless
the system is looking for more memory to use. This is why you might
see memory use grow to considerable amounts in older versions of the
IDE. I believe in the newer versions (of the IDE), they (embarcadero)
force collection a little more often.
There is also a way to force the IDE to tell the framework to take out
the trash, although I can't remember what it is. It is a registry key
that allows you to set a timer interval.
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
unsubscribe
More information about the Delphi
mailing list