Fix memory leak in wxDataViewListStore::DeleteItem().
The item data needs to be deleted in addition to simply removing it from the internal storage. Closes #11757. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
cbe0676038
commit
2d6bba4118
@ -1486,6 +1486,7 @@ void wxDataViewListStore::InsertItem( unsigned int row, const wxVector<wxVarian
|
|||||||
void wxDataViewListStore::DeleteItem( unsigned int row )
|
void wxDataViewListStore::DeleteItem( unsigned int row )
|
||||||
{
|
{
|
||||||
wxVector<wxDataViewListStoreLine*>::iterator it = m_data.begin() + row;
|
wxVector<wxDataViewListStoreLine*>::iterator it = m_data.begin() + row;
|
||||||
|
delete *it;
|
||||||
m_data.erase( it );
|
m_data.erase( it );
|
||||||
|
|
||||||
RowDeleted( row );
|
RowDeleted( row );
|
||||||
|
Loading…
Reference in New Issue
Block a user