]> git.saurik.com Git - wxWidgets.git/commitdiff
remove redundant WX_CLEAR_LIST, it's done by base dtor
authorPaul Cornett <paulcor@bullseye.com>
Thu, 24 Jan 2008 18:13:12 +0000 (18:13 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Thu, 24 Jan 2008 18:13:12 +0000 (18:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/menucmn.cpp
src/gtk/menu.cpp

index e2d31c67f2fc88731fee9870c5f52115af65e624..49f2b2d20ffafc7b9e64d59fac4181cb1ceac7ab 100644 (file)
@@ -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.
 }
 
 // ----------------------------------------------------------------------------
index dba9aea315c0e25b9105f761c317bf9b7de8d564..2e2e0fda3fdff9f54bd58fb63f50e37215d8c2d6 100644 (file)
@@ -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)