]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix memory leak in wxDataViewListStore::DeleteItem().
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 5 Mar 2010 23:55:31 +0000 (23:55 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 5 Mar 2010 23:55:31 +0000 (23:55 +0000)
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

src/common/datavcmn.cpp

index 99449244bb5bdc2f3c89e9c8f465a8c3a7fc0c87..de0608121e47d0e4915eba3d293c719908712171 100644 (file)
@@ -1486,6 +1486,7 @@ void wxDataViewListStore::InsertItem(  unsigned int row, const wxVector<wxVarian
 void wxDataViewListStore::DeleteItem( unsigned int row )
 {
     wxVector<wxDataViewListStoreLine*>::iterator it = m_data.begin() + row;
+    delete *it;
     m_data.erase( it );
 
     RowDeleted( row );