Enable dump of debug heap memory leaks

This commit is contained in:
Dmitry-Me 2014-10-23 11:37:03 +04:00
parent d211bb1351
commit 99916599da
1 changed files with 2 additions and 0 deletions

View File

@ -279,6 +279,8 @@ int main( int argc, const char ** argv )
{ {
#if defined( _MSC_VER ) && defined( DEBUG ) #if defined( _MSC_VER ) && defined( DEBUG )
_CrtMemCheckpoint( &startMemState ); _CrtMemCheckpoint( &startMemState );
// Enable MS Visual C++ debug heap memory leaks dump on exit
_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF);
#endif #endif
#if defined(_MSC_VER) || defined(MINGW32) || defined(__MINGW32__) #if defined(_MSC_VER) || defined(MINGW32) || defined(__MINGW32__)