mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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:
@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user