Some cleanup, enable CRT memory tracker in debug builds

This commit is contained in:
Henrik Rydgard committed 2015-10-04 14:11:34 +02:00
1 parent 6785a95384
commit 490d8be4df
3 files changed
+14 -7

No files matched your search

+9
View File
@@ -39,6 +39,7 @@
#include "Commctrl.h"
#include "UI/GameInfoCache.h"
#include "Windows/resource.h"
#include "Windows/MainWindow.h"
@@ -347,6 +348,10 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
CoInitializeEx(NULL, COINIT_MULTITHREADED);
#ifdef _DEBUG
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF);
#endif
PROFILE_INIT();
// FMA3 support in the 2013 CRT is broken on Vista and Windows 7 RTM (fixed in SP1). Just disable it.
@@ -597,11 +602,15 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
}
g_Config.Save();
g_gameInfoCache.Clear();
g_gameInfoCache.Shutdown();
LogManager::Shutdown();
if (g_Config.bRestartRequired) {
W32Util::ExitAndRestart();
}
CoUninitialize();
return 0;
}