Boost logo

Boost Users :

From: Will Bryant (will_at_[hidden])
Date: 2005-09-25 03:35:14

Continuing on the thread about the threadmon singleton:

> In addition, there is no good place to put the delete. You have to play
> games with atexit and then deal with the possibily of resurrection
> (singleton access after it's been deleted.)

Can we not just use a static instance of a small deleter class whose
destructor frees the singleton?

(Note that I'm not suggesting that we use the static instance to also
_create_ the singleton, nor to be the singleton itself - as already
discussed, that's insufficient as there's no general way to specify
initialization order so using call_once remains the best option there
IMHO - but we _can_, I believe, fix the problem that's causing Visual
C++ programs to spew out memory leak errors every time we run them.)

Will Bryant
+64 21 655 443

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at