Some cleanup, enable CRT memory tracker in debug builds

This commit is contained in:
Henrik Rydgard 2015-10-04 12:24:59 +02:00
parent 6785a95384
commit 490d8be4df
3 changed files with 14 additions and 7 deletions

View File

@ -30,15 +30,8 @@ namespace MIPSComp {
class AsmRoutineManager : public Gen::XCodeBlock {
private:
void Generate(MIPSState *mips, MIPSComp::Jit *jit, MIPSComp::JitOptions *jo);
void GenerateCommon();
public:
AsmRoutineManager() {
}
~AsmRoutineManager() {
FreeCodeSpace();
}
void Init(MIPSState *mips, MIPSComp::Jit *jit, MIPSComp::JitOptions *jo) {
AllocCodeSpace(8192);
Generate(mips, jit, jo);

View File

@ -15,6 +15,8 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "Common/Common.h"
#include <string>
#include <map>
#include <memory>
@ -45,6 +47,9 @@
GameInfoCache g_gameInfoCache;
GameInfo::~GameInfo() {
delete iconTexture;
delete pic0Texture;
delete pic1Texture;
delete fileLoader;
}

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