I am trying to enable msvc memory leak detection with line number, like this snippet I found here :
Detected memory leaks! Dumping objects -> C:\PROGRAM FILES\VISUAL STUDIO\MyProjects\leaktest\leaktest.cpp(20) : {18} normal block at 0x00780E80, 64 bytes long. Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD Object dump complete.
I tried installing the define preprocessor
_CRTDBG_MAP_ALLOC
manually in the project properties, but I only get this:
Dumping objects -> {1466} normal block at 0x00BD4DD0, 40 bytes long. Data: <(o; ; (o; 1 > 28 6F 3B 00 90 A9 3B 00 28 6F 3B 00 00 D6 31 10
without line numbers. I also tried to manually determine main using BOOST_TEST_NO_MAIN, and reset myself as follows:
int main( int argc, char* argv[] ) { int res = ::boost::unit_test::unit_test_main( &init_function, argc, argv ); _CrtDumpMemoryLeaks(); return res; }
But without success. How can I do that?
source share