DolphinWX: Get rid of unnecessary Destroy calls

Removes the requirement for stack allocated InputConfigDialogs to call Destroy. This shouldn't be necessary for wxDialog derivatives.
This also fixes a leak that would occur every time an InputConfigDialog is opened and closed. wxWindow subclasses (this includes wxDialog) only destroy child windows and sizers (including things in the sizers). So every wxTimer allocation would have resulted in a leak.
This commit is contained in:
Lioncash
2015-02-11 09:07:16 -05:00
parent d9988ee9b5
commit 9a6b6a99e8
5 changed files with 10 additions and 28 deletions

View File

@ -23,6 +23,7 @@
#include <wx/sizer.h>
#include <wx/spinctrl.h>
#include <wx/string.h>
#include <wx/timer.h>
#include <wx/translation.h>
#include "InputCommon/ControllerEmu.h"
@ -39,7 +40,6 @@ class wxSlider;
class wxStaticBitmap;
class wxStaticText;
class wxTextCtrl;
class wxTimer;
class wxTimerEvent;
class wxWindow;
@ -224,9 +224,6 @@ class InputConfigDialog : public wxDialog
{
public:
InputConfigDialog(wxWindow* const parent, InputConfig& config, const wxString& name, const int tab_num = 0);
//~InputConfigDialog();
bool Destroy() override;
void ClickSave(wxCommandEvent& event);
@ -241,5 +238,5 @@ private:
wxNotebook* m_pad_notebook;
std::vector<GamepadPage*> m_padpages;
InputConfig& m_config;
wxTimer* m_update_timer;
wxTimer m_update_timer;
};