Fix memory leak. Layout should not hold ref to canvas

This commit is contained in:
spider%netscape.com 1998-10-08 03:00:12 +00:00
Родитель 8d26b3c0c8
Коммит e70d65c945
1 изменённых файлов: 0 добавлений и 3 удалений

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

@ -49,7 +49,6 @@ nsBoxLayout :: nsBoxLayout() : nsLayout()
nsBoxLayout :: ~nsBoxLayout()
{
NS_IF_RELEASE(mContainer);
}
@ -83,9 +82,7 @@ nsresult nsBoxLayout :: Init()
nsresult nsBoxLayout :: Init(nsIXPFCCanvas * aContainer)
{
NS_IF_RELEASE(mContainer);
mContainer = aContainer;
NS_ADDREF(mContainer);
return NS_OK ;
}