From 0918dd3c9a7b896a3f03dbaf9cdf86e97b315bfb Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 27 Aug 2002 22:07:31 +0000 Subject: [PATCH] Turn on memory leak checking. --- stepmania/src/StepMania.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index efa5d4c95e..b911e1db54 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -143,6 +143,9 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow ) _set_se_translator( StructuredExceptionHandler ); g_hInstance = hInstance; +#ifdef _DEBUG + _CrtSetDbgFlag(_CRTDBG_CHECK_ALWAYS_DF); +#endif #ifndef _DEBUG try @@ -344,6 +347,12 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow ) CoUninitialize(); // Uninitialize COM CloseHandle( g_hMutex ); +#ifdef _DEBUG + _CrtCheckMemory(); + + _CrtDumpMemoryLeaks(); +#endif + return 0L; }