1. corrected client data deletion in wxListBox (no more memory leaks in controls
sample) 2. added wxST_NO_AUTORESIZE style for wxGTK and wxMSW and added test for it to the controls sample git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -359,13 +359,17 @@ void wxListBox::Clear()
|
||||
void wxListBox::Free()
|
||||
{
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
size_t uiCount = m_aItems.Count();
|
||||
while ( uiCount-- != 0 ) {
|
||||
delete m_aItems[uiCount];
|
||||
}
|
||||
if ( m_windowStyle & wxLB_OWNERDRAW )
|
||||
{
|
||||
size_t uiCount = m_aItems.Count();
|
||||
while ( uiCount-- != 0 ) {
|
||||
delete m_aItems[uiCount];
|
||||
}
|
||||
|
||||
m_aItems.Clear();
|
||||
#else // !wxUSE_OWNER_DRAWN
|
||||
m_aItems.Clear();
|
||||
}
|
||||
else
|
||||
#endif // wxUSE_OWNER_DRAWN
|
||||
if ( HasClientObjectData() )
|
||||
{
|
||||
for ( size_t n = 0; n < (size_t)m_noItems; n++ )
|
||||
@@ -373,7 +377,6 @@ void wxListBox::Free()
|
||||
delete GetClientObject(n);
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_OWNER_DRAWN/!wxUSE_OWNER_DRAWN
|
||||
}
|
||||
|
||||
void wxListBox::SetSelection(int N, bool select)
|
||||
|
Reference in New Issue
Block a user