improved memory liberation (explicitly set to NULL after delete)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2002-06-23 17:22:54 +00:00
parent d208e6412a
commit f5bb225133
20 changed files with 140 additions and 80 deletions

View File

@@ -265,6 +265,7 @@ void wxListBox::Free()
size_t uiCount = m_aItems.Count();
while ( uiCount-- != 0 ) {
delete m_aItems[uiCount];
m_aItems[uiCount] = NULL;
}
m_aItems.Clear();
@@ -373,6 +374,7 @@ void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData)
size_t ui = m_aItems.Count();
while ( ui-- != 0 ) {
delete m_aItems[ui];
m_aItems[ui] = NULL;
}
m_aItems.Empty();