fixed memory leak in UpdateAttr[Rows][Or][Cols] (patch 1104355)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-01-18 16:15:20 +00:00
parent 1539bf2744
commit 01dd42b61f

View File

@ -2431,7 +2431,8 @@ void wxGridCellAttrData::UpdateAttrRows( size_t pos, int numRows )
else
{
// ...or remove the attribute
m_attrs.RemoveAt((size_t)n);
m_attrs[n].attr->DecRef();
m_attrs.RemoveAt(n);
n--; count--;
}
}
@ -2464,7 +2465,8 @@ void wxGridCellAttrData::UpdateAttrCols( size_t pos, int numCols )
else
{
// ...or remove the attribute
m_attrs.RemoveAt((size_t)n);
m_attrs[n].attr->DecRef();
m_attrs.RemoveAt(n);
n--; count--;
}
}
@ -2562,8 +2564,9 @@ void wxGridRowOrColAttrData::UpdateAttrRowsOrCols( size_t pos, int numRowsOrCols
rowOrCol += numRowsOrCols;
else
{
m_rowsOrCols.RemoveAt((size_t)n);
m_attrs.RemoveAt((size_t)n);
m_rowsOrCols.RemoveAt(n);
m_attrs[n]->DecRef();
m_attrs.RemoveAt(n);
n--; count--;
}
}