wxListBox::~wxListBox()
{
- Free() ;
+ FreeData() ;
if ( m_macList )
{
#if !TARGET_CARBON
}
}
-void wxListBox::Free()
+void wxListBox::FreeData()
{
#if wxUSE_OWNER_DRAWN
if ( m_windowStyle & wxLB_OWNERDRAW )
size_t uiCount = m_aItems.Count();
while ( uiCount-- != 0 ) {
delete m_aItems[uiCount];
+ m_aItems[uiCount] = NULL;
}
m_aItems.Clear();
size_t ui = m_aItems.Count();
while ( ui-- != 0 ) {
delete m_aItems[ui];
+ m_aItems[ui] = NULL;
}
m_aItems.Empty();
void wxListBox::Clear()
{
- Free();
+ FreeData();
m_noItems = 0;
m_stringArray.Empty() ;
m_dataArray.Empty() ;