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:
Mattia Barbon
2003-07-12 02:27:53 +00:00
parent e59a80556e
commit 89c20ac15c
2 changed files with 4 additions and 0 deletions

View File

@@ -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;
}