]> git.saurik.com Git - wxWidgets.git/commitdiff
Now cleared array elements of arrays before calling Empty(),
authorJulian Smart <julian@anthemion.co.uk>
Tue, 10 Sep 2002 20:31:02 +0000 (20:31 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 10 Sep 2002 20:31:02 +0000 (20:31 +0000)
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

src/generic/grid.cpp

index e74164d9aed8834a3aaf2463f5e73609a4c3715c..11606f0f9424e644f8a701ff80e4f5d5e018960f 100644 (file)
@@ -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
         {