Explorar o código

Enable dump of debug heap memory leaks

Dmitry-Me %!s(int64=11) %!d(string=hai) anos
pai
achega
99916599da
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      xmltest.cpp

+ 2 - 0
xmltest.cpp

@@ -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__)