[Boost.Test] Problem with vc9 runtime library

Hello all.
I have the following program:
--------------------------
#define BOOST_TEST_MODULE Test
#include

Any workarounds?
On Sun, Jun 15, 2008 at 3:27 AM, Gennadiy Rozental
Greg Ravikovich
writes: But when compiled with Mulithreaded Debug runtime library (/MTD) The program reports: Detected memory leaks!
What could cause this?Any suggestions?
Mulithreaded Debug runtime library ;)
Gennadiy
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Thanks, Greg

When trying to determine where memory leaks are coming from, you could try
something like this...
#include

Mike(dev
When trying to determine where memory leaks are coming from, you could try something like this...
#include
int main() // try replacing this line with BOOST_AUTO_TEST_CASE_TEMPLATE { // break on memory allocation number _crtBreakAlloc = 83; // or 84, 93,94 }
Boost.Test supports this directly just pass allocation number as the value of the argument detect_memory_leaks: test_modul.exe --detect_memory_leaks=83 Unfortunately in my experience with previous version of MS runtime this doesn't actually break exactly at the same allocation we if you did not pass the parameter. It's somewhere in a vicinity though: plus/minus couple. Gennadiy

The Microsoft debug libraries have some memory leaks in them. It's frustrating but I've given up on making my debug builds leak-free. If you've inspected all your DEBUG-conditional code carefully and you're sure there are no leaks in the release build, go on to another problem. I suggest you introduce an intentional leak to make sure leak detection is working properly in your release configuration. Then write off any leaks that occur only in the debug configuration.

Thanks a lot guys.
I'll work with the DLL runtime libraries meanwhile, The code seems to work
alright using them.
Greg
On Mon, Jun 16, 2008 at 3:41 PM, Stephen Nuchia
The Microsoft debug libraries have some memory leaks in them. It's frustrating but I've given up on making my debug builds leak-free. If you've inspected all your DEBUG-conditional code carefully and you're sure there are no leaks in the release build, go on to another problem.
I suggest you introduce an intentional leak to make sure leak detection is working properly in your release configuration. Then write off any leaks that occur only in the debug configuration.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Thanks, Greg
participants (4)
-
Gennadiy Rozental
-
Greg Ravikovich
-
Mike(dev)
-
Stephen Nuchia