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:
@@ -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 ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user