From 99916599dab459d18f56da6053ef0b51bbba62f8 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Thu, 23 Oct 2014 11:37:03 +0400 Subject: [PATCH] Enable dump of debug heap memory leaks --- xmltest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xmltest.cpp b/xmltest.cpp index 56b6c82..c5dd135 100644 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -279,6 +279,8 @@ int main( int argc, const char ** argv ) { #if defined( _MSC_VER ) && defined( DEBUG ) _CrtMemCheckpoint( &startMemState ); + // Enable MS Visual C++ debug heap memory leaks dump on exit + _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF); #endif #if defined(_MSC_VER) || defined(MINGW32) || defined(__MINGW32__)