fixed a memory leak where a style context was not being released when

the table cell set the table column's style.
This commit is contained in:
buster%netscape.com 1998-08-17 19:03:36 +00:00
Родитель 1220309b5c
Коммит 49d858783e
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -2526,9 +2526,10 @@ nsTableFrame::SetColumnStyleFromCell(nsIPresContext * aPresContext,
if (nsTableColFrame::eWIDTH_SOURCE_CELL != colFrame->GetWidthSource())
{
// get the column style and set the width attribute
nsIStyleContext* colSC;
nsIStyleContext *colSC;
colFrame->GetStyleContext(aPresContext, colSC);
nsStylePosition* colPosition = (nsStylePosition*) colSC->GetMutableStyleData(eStyleStruct_Position);
NS_RELEASE(colSC);
// set the column width attribute
if (eStyleUnit_Coord == cellPosition->mWidth.GetUnit())
{

Просмотреть файл

@ -2526,9 +2526,10 @@ nsTableFrame::SetColumnStyleFromCell(nsIPresContext * aPresContext,
if (nsTableColFrame::eWIDTH_SOURCE_CELL != colFrame->GetWidthSource())
{
// get the column style and set the width attribute
nsIStyleContext* colSC;
nsIStyleContext *colSC;
colFrame->GetStyleContext(aPresContext, colSC);
nsStylePosition* colPosition = (nsStylePosition*) colSC->GetMutableStyleData(eStyleStruct_Position);
NS_RELEASE(colSC);
// set the column width attribute
if (eStyleUnit_Coord == cellPosition->mWidth.GetUnit())
{