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