diff --git a/eeschema/dialogs/dialog_choose_component.cpp b/eeschema/dialogs/dialog_choose_component.cpp index 0f6e4cdae4..dab4e2de23 100644 --- a/eeschema/dialogs/dialog_choose_component.cpp +++ b/eeschema/dialogs/dialog_choose_component.cpp @@ -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 ); diff --git a/eeschema/dialogs/dialog_choose_component.h b/eeschema/dialogs/dialog_choose_component.h index d0aee6945e..6af8869ac3 100644 --- a/eeschema/dialogs/dialog_choose_component.h +++ b/eeschema/dialogs/dialog_choose_component.h @@ -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(). *