Sfoglia il codice sorgente

Merge pull request #218 from Dmitry-Me/enableLeakTracing

Enable dump of debug heap memory leaks
Lee Thomason 11 anni fa
parent
commit
4de01a9489
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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 )
 		_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__)