diff --git a/Source/Core/Core/Src/State.cpp b/Source/Core/Core/Src/State.cpp index 9706a7c928..14dd4bc855 100644 --- a/Source/Core/Core/Src/State.cpp +++ b/Source/Core/Core/Src/State.cpp @@ -392,8 +392,17 @@ void Shutdown() { Flush(); - g_current_buffer.clear(); - g_undo_load_buffer.clear(); + // swapping with an empty vector, rather than clear()ing + // this gives a better guarantee to free the allocated memory right NOW + { + std::vector tmp; + g_current_buffer.swap(tmp); + } + + { + std::vector tmp; + g_undo_load_buffer.swap(tmp); + } } static std::string MakeStateFilename(int number) diff --git a/Source/Core/DolphinWX/Src/InputConfigDiag.cpp b/Source/Core/DolphinWX/Src/InputConfigDiag.cpp index 525fffb439..b1883261e9 100644 --- a/Source/Core/DolphinWX/Src/InputConfigDiag.cpp +++ b/Source/Core/DolphinWX/Src/InputConfigDiag.cpp @@ -37,7 +37,9 @@ void GamepadPage::ConfigExtension(wxCommandEvent& event) // show config diag, if "none" isn't selected if (ex->switch_extension) { - wxDialog dlg(this, -1, WXTSTR_FROM_CSTR(ex->attachments[ex->switch_extension]->GetName().c_str())); + wxDialog dlg(this, -1, + WXTSTR_FROM_CSTR(ex->attachments[ex->switch_extension]->GetName().c_str()), + wxDefaultPosition, wxDefaultSize); wxBoxSizer* const main_szr = new wxBoxSizer(wxVERTICAL); const std::size_t orig_size = control_groups.size();