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; }