Turn on memory leak checking.
This commit is contained in:
@@ -143,6 +143,9 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow )
|
|||||||
_set_se_translator( StructuredExceptionHandler );
|
_set_se_translator( StructuredExceptionHandler );
|
||||||
|
|
||||||
g_hInstance = hInstance;
|
g_hInstance = hInstance;
|
||||||
|
#ifdef _DEBUG
|
||||||
|
_CrtSetDbgFlag(_CRTDBG_CHECK_ALWAYS_DF);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
try
|
try
|
||||||
@@ -344,6 +347,12 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow )
|
|||||||
CoUninitialize(); // Uninitialize COM
|
CoUninitialize(); // Uninitialize COM
|
||||||
CloseHandle( g_hMutex );
|
CloseHandle( g_hMutex );
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
_CrtCheckMemory();
|
||||||
|
|
||||||
|
_CrtDumpMemoryLeaks();
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user