
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Gennadiy Rozental Sent: Thursday, October 28, 2010 2:03 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Are memory leaks reported by Boost.Test Microsoft Memory Leak Detection Enabling spurious or real?
Paul A. Bristow
writes: But no filename is given as promised by http://msdn.microsoft.com/en-us/library/e5ewb1h3%28v=VS.80%29.aspx
You need special macro defined in your code. Read the page for details.
I've added this at the head of the test file.cpp
#define _CRTDBG_MAP_ALLOC
#include
Or is this spurious? Should I just suppress the warnings?
Most probably it's real (unless you are using some third party software, which has leaks you can ignore).
Pure Boost! (and no messing with malloc or pointers (by me)). Paul PS Curiously, if I add the #define _CRTDBG_MAP_ALLOC etc to an example file (not using Boost.Test), that calls the function that caused the reports to start, I don't get any leak reports (using debug mode). PPS typeid(MyType).name(); http://support.microsoft.com/kb/140670/en-gb Which sounds plausible, but it is way out of date, so does it still apply to VC10? I'm not using typeid myself (but I suspect it is used elsewhere in Boost.Math - if not Boost.Test!). --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com