Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

detect_memory_leaks
PrevUpHomeNext

Detect memory leaks.

Positive value tells the framework to detect the memory leaks (if any). In addition any value greater than 1 is treated as leak allocation number and setups runtime breakpoint. In other words setting this parameter to the positive value N greater than 1 causes the framework to set a breakpoint at Nth memory allocation (don't do that from the command line - only when you are under debugger).

[Note] Note

If your test program produces memory leaks notifications, they are combined with allocation number values you could use to set a breakpoint.

[Caution] Caution

Currently only applies to MS family of compilers in debug builds.

Acceptable values
  • 0
  • 1 (default)
  • integer value > 1
Environment variable
BOOST_TEST_DETECT_MEMORY_LEAK

PrevUpHomeNext