From: Julian Smart Date: Tue, 10 Sep 2002 20:31:02 +0000 (+0000) Subject: Now cleared array elements of arrays before calling Empty(), X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c5a7ca86896f1d9ebc046745e36ab079da2d46d0 Now cleared array elements of arrays before calling Empty(), after suggestion by John Labenski. I don't know why this should cure the memory problem, but it seems to. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index e74164d9ae..11606f0f94 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3092,6 +3092,7 @@ bool wxGridStringTable::DeleteRows( size_t pos, size_t numRows ) if ( numRows >= curNumRows ) { + for (size_t i=0; i< m_data.GetCount(); i++) m_data[i].Clear(); m_data.Empty(); // don't release memory just yet } else @@ -3205,7 +3206,9 @@ bool wxGridStringTable::DeleteCols( size_t pos, size_t numCols ) { if ( numCols >= curNumCols ) { - m_data[row].Clear(); + for (size_t i=0; i< m_data[row].GetCount(); i++) (m_data[row])[i].Clear(); + m_data[row].Empty(); +// m_data[row].Clear(); } else {