Fix memory leak. Layout should not hold ref to canvas

git-svn-id: svn://10.0.0.236/trunk@12263 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
spider%netscape.com
1998-10-08 03:00:12 +00:00
parent 308a0243aa
commit f10132e682

View File

@@ -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 ;
}