Fix memory leak in wxListBox destructor in wxUniv

wxItemContainer::Clear() must be called to actually free the client
data, and not just DoClear() (which will be called by the base class
Clear() too).

Closes #22489.
This commit is contained in:
Kvaz1r
2022-06-05 13:41:46 +03:00
committed by Vadim Zeitlin
parent 35e982a67f
commit 3661975bf8

View File

@@ -197,7 +197,7 @@ bool wxListBox::Create(wxWindow *parent,
wxListBox::~wxListBox()
{
// call this just to free the client data -- and avoid leaking memory
DoClear();
Clear();
if ( IsSorted() )
delete m_strings.sorted;