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
This commit is contained in:
Julian Smart 2002-09-10 20:31:02 +00:00
parent 6ba7c06eee
commit c5a7ca8689

View 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
{