diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2014-05-08 00:58:55 -0700 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2014-05-08 00:58:55 -0700 |
| commit | fa65eeb492ebea6f2eb926eb5e6c30da2173a9a4 (patch) | |
| tree | 9a3f032ac9513036887020b90b6220bcb61378ba /Source/Core | |
| parent | b4e1ac5f080d630d33842822b8e3470d2c62abc3 (diff) | |
Apparently the debug build has not been freeing memory since 2008. Undo that.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/State.cpp | 16 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/Main.cpp | 6 |
2 files changed, 0 insertions, 22 deletions
diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index f0060a4c70..8d06c74686 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -427,16 +427,6 @@ void LoadAs(const std::string& filename) // Stop the core while we load the state bool wasUnpaused = Core::PauseAndLock(true); -#if defined _DEBUG && defined _WIN32 - // we use _CRTDBG_DELAY_FREE_MEM_DF (as a speed hack?), - // but it was causing us to leak gigantic amounts of memory here, - // enough that only a few savestates could be loaded before crashing, - // so let's disable it temporarily. - int tmpflag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); - if (g_loadDepth == 0) - _CrtSetDbgFlag(tmpflag & ~_CRTDBG_DELAY_FREE_MEM_DF); -#endif - g_loadDepth++; // Save temp buffer for undo load state @@ -494,12 +484,6 @@ void LoadAs(const std::string& filename) g_loadDepth--; -#if defined _DEBUG && defined _WIN32 - // restore _CRTDBG_DELAY_FREE_MEM_DF - if (g_loadDepth == 0) - _CrtSetDbgFlag(tmpflag); -#endif - // resume dat core Core::PauseAndLock(false, wasUnpaused); } diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp index 76f001b180..47e70ccb50 100644 --- a/Source/Core/DolphinWX/Main.cpp +++ b/Source/Core/DolphinWX/Main.cpp @@ -232,12 +232,6 @@ bool DolphinApp::OnInit() } #endif // wxUSE_CMDLINE_PARSER -#if defined _DEBUG && defined _WIN32 - int tmpflag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); - tmpflag |= _CRTDBG_DELAY_FREE_MEM_DF; - _CrtSetDbgFlag(tmpflag); -#endif - // Register message box and translation handlers RegisterMsgAlertHandler(&wxMsgAlert); RegisterStringTranslator(&wxStringTranslator); |
