diff --git a/src/common/artprov.cpp b/src/common/artprov.cpp index 74f8f798e7..1dda57dd33 100644 --- a/src/common/artprov.cpp +++ b/src/common/artprov.cpp @@ -148,6 +148,7 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL; /*static*/ void wxArtProvider::CleanUpProviders() { + WX_CLEAR_LIST(wxArtProvidersList, *sm_providers); wxDELETE(sm_providers); wxDELETE(sm_cache); } diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 3f7e4352a6..c34e516932 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -434,6 +434,7 @@ bool wxSizer::Detach( wxSizer *sizer ) if (item->GetSizer() == sizer) { item->DetachSizer(); + delete item; m_children.Erase( node ); return true; } @@ -455,6 +456,7 @@ bool wxSizer::Detach( wxWindow *window ) if (item->GetWindow() == window) { item->GetWindow()->SetContainingSizer( NULL ); + delete item; m_children.Erase( node ); return true; } @@ -481,6 +483,7 @@ bool wxSizer::Detach( int index ) else if( item->IsWindow() ) item->GetWindow()->SetContainingSizer( NULL ); + delete item; m_children.Erase( node ); return true; }