From: Vadim Zeitlin Date: Fri, 5 Mar 2010 23:55:31 +0000 (+0000) Subject: Fix memory leak in wxDataViewListStore::DeleteItem(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2d6bba41180b9876bce4bd855c07d45874e85e49 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 --- diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 99449244bb..de0608121e 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -1486,6 +1486,7 @@ void wxDataViewListStore::InsertItem( unsigned int row, const wxVector::iterator it = m_data.begin() + row; + delete *it; m_data.erase( it ); RowDeleted( row );