|
Boost : |
From: Roland (roland.schwarz_at_[hidden])
Date: 2004-08-05 11:29:33
On Thu, 5 Aug 2004 18:10:10 +0200 (W. Europe Daylight Time) Roland <roland.schwarz_at_[hidden]> wrote:
> BTW.: while everything seems nice so far I just tried to use the thing with
> MFC. It turns out that the process / thread init / term need even some more tweeking.
> While every destructor is getting called properly the debug version of MFC still
> thinks it has discovered a memory leak. Since this will be able to make a potential
> user nervous, I am looking to a way to get rid of these messages (by finding
> the correct calling order).
I am not anymore sure the leak has to do with the calling order. At least I tracked
the leak down to somewhere near:
// Intentional memory "leak"
// This is the only way to ensure the mutex in the global data
// structure is available when cleanup handlers are run, since the
// execution order of cleanup handlers is unspecified on any platform
// with regards to C++ destructor ordering rules.
However I do not yet understand fully what is going on. What will I need to
expect beeing leaking? I am not sure if there are additional leaks from
elsewhere.
Also, isn't the atexit well specified with respect to the global dtors?
Is this MS specific or is this in the standard?
Could you please help me?
Roland
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk