From 3fd7b18a6199f64b5a58e7af50e2870e97430790 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 24 Jan 2008 18:13:12 +0000 Subject: [PATCH] remove redundant WX_CLEAR_LIST, it's done by base dtor git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/menucmn.cpp | 2 -- src/gtk/menu.cpp | 7 ------- 2 files changed, 9 deletions(-) diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index e2d31c67f2..49f2b2d20f 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -152,8 +152,6 @@ void wxMenuBase::Init(long style) wxMenuBase::~wxMenuBase() { WX_CLEAR_LIST(wxMenuItemList, m_items); - - // Actually, in GTK, the submenus have to get deleted first. } // ---------------------------------------------------------------------------- diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index dba9aea315..2e2e0fda3f 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -1009,13 +1009,6 @@ wxMenu::~wxMenu() if ( m_owner ) gtk_widget_destroy( m_menu ); } - - // This must come after we release GTK resources above. Otherwise, GTK will - // give warnings/errors when attempting to free accelerator resources from - // child items that just were destroyed (the m_menu widget can contain - // references to accelerators in child items. Problem detected when removing - // a menu from a wxMenuBar, and the removed menu had submenus with accelerators.) - WX_CLEAR_LIST(wxMenuItemList, m_items); } void wxMenu::SetLayoutDirection(const wxLayoutDirection dir) -- 2.45.2