From d906a952700493da046145c77a2f12b5d6791183 Mon Sep 17 00:00:00 2001 From: Gennadiy Rozental Date: Wed, 11 Sep 2013 04:42:13 +0000 Subject: [PATCH] do not set alloc number if 1 [SVN r85648] --- include/boost/test/impl/debug.ipp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/test/impl/debug.ipp b/include/boost/test/impl/debug.ipp index 5751f7ac06..12f389ea5b 100644 --- a/include/boost/test/impl/debug.ipp +++ b/include/boost/test/impl/debug.ipp @@ -958,7 +958,9 @@ break_memory_alloc( long mem_alloc_order_num ) unit_test::ut_detail::ignore_unused_variable_warning( mem_alloc_order_num ); #ifdef BOOST_MS_CRT_BASED_DEBUG - _CrtSetBreakAlloc( mem_alloc_order_num ); + // only set the value if one was supplied (do not use default used by UTF just as a indicator to enable leak detection) + if( mem_alloc_order_num > 1 ) + _CrtSetBreakAlloc( mem_alloc_order_num ); #endif // BOOST_MS_CRT_BASED_DEBUG }