diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 10656f39f4..64c2b57e44 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -683,7 +683,9 @@ wxMenu::Init( const wxString& title, wxMenu::~wxMenu() { - /* how do we delete an item-factory ? */ + /* how do we delete an item-factory ? */ + gtk_widget_destroy( m_menu ); + } void wxMenu::SetTitle( const wxString& title ) diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index 10656f39f4..64c2b57e44 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -683,7 +683,9 @@ wxMenu::Init( const wxString& title, wxMenu::~wxMenu() { - /* how do we delete an item-factory ? */ + /* how do we delete an item-factory ? */ + gtk_widget_destroy( m_menu ); + } void wxMenu::SetTitle( const wxString& title )