|
Boost Users : |
Subject: Re: [Boost-users] [Chrono] Memory leak in Chrono?
From: gast128 (gast128_at_[hidden])
Date: 2013-02-12 16:06:25
On 2/12/2013 7:17 PM, Vicente J. Botet Escriba wrote:
> Le 12/02/13 18:13, gast128 a écrit :
>> we use Boost.Chrono too. MFC applications incorrectly report memory
>> leaks, which can easily be solved.
> Hi,
>
> if you have some patches to propose to avoids this incorrect reports I
> would try to include them.
>
> Best,
> Vicente
Ah it is not a library problem but a MFC problem. MFC does its leak
detecting in a global object '_AFX_DEBUG_STATE'. The trick is to link
MFC as early as possible (so it gets unloaded as late as possible which
triggers the dtor of that object late, which does the leak detection
late etc.). A way to do that is to put mfc100d.lib (for vc10) as first
entry in the 'additonal properties' entry under the linker options in
Visual Studio.
Having said that, it is not sure if the user shares the same problem.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net