Fix some leaks cause by removing list.DeleteContents calls.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user