$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2008-06-15 17:15:54
Mike(dev <dev.wilson <at> ntlworld.com> writes:
>
> When trying to determine where memory leaks are coming from, you could try
> something like this...
>
> #include <crtdbg.h>
> 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