Fixed a memleak in DIALOG_CHOOSE_COMPONENT

This commit is contained in:
Maciej Suminski 2017-03-23 16:52:05 +01:00
parent e98ae3e463
commit b47a6e415b
2 changed files with 13 additions and 0 deletions

View File

@ -104,6 +104,17 @@ DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(
}
DIALOG_CHOOSE_COMPONENT::~DIALOG_CHOOSE_COMPONENT()
{
// I am not sure the following two lines are necessary,
// but they will not hurt anyone
m_dbl_click_timer->Stop();
Unbind( wxEVT_TIMER, &DIALOG_CHOOSE_COMPONENT::OnCloseTimer, this );
delete m_dbl_click_timer;
}
wxPanel* DIALOG_CHOOSE_COMPONENT::ConstructLeftPanel( wxWindow* aParent )
{
auto panel = new wxPanel( aParent );

View File

@ -97,6 +97,8 @@ public:
CMP_TREE_MODEL_ADAPTER::PTR& aAdapter,
int aDeMorganConvert );
~DIALOG_CHOOSE_COMPONENT();
/** Function GetSelectedAlias
* To be called after this dialog returns from ShowModal().
*