[Gc] C++ API enhancement proposal
Hans.Boehm at hp.com
Sun Oct 14 21:54:48 PDT 2007
For what it's worth, the current CVS tree initializes on demand
for GC_malloc again, to the extent the platform allows. I expect that
even on platforms for which GC_INIT was always needed, you may again get
away with it so long as the first real GC happens after GC_INIT is called.
I still agree that you should still avoid non-POD globals. They may get
particularly interesting if you have daemon threads running that continue
to run after the destructors for those globals. The C++ committee has
spent some time discussing how to deal with this. But that's a different
On Sun, 14 Oct 2007, MenTaLguY wrote:
> On Mon, 2007-10-15 at 03:20 +1000, skaller wrote:
>> I beg to differ. The best practice is to use only global POD
> If you want singletons, it's the best way to do them without resorting
> to non-POD constants, period.
> Granted, doing singletons in C++ does mean fighting the language, and I
> admit they're rarely the best way to do things generally...
More information about the Gc