Added some calls to NS_RELEASE() when exiting the function

This commit is contained in:
troy%netscape.com 1998-07-30 17:46:33 +00:00
parent 54af0f86f2
commit 81e0cb7584

View File

@ -248,6 +248,7 @@ nsInputFrame::Reflow(nsIPresContext& aPresContext,
}
nsIPresShell *presShell = aPresContext.GetShell(); // need to release
nsIViewManager *viewMan = presShell->GetViewManager(); // need to release
NS_RELEASE(presShell);
GetDesiredSize(&aPresContext, aReflowState, aDesiredSize, mWidgetSize);
@ -272,6 +273,8 @@ nsInputFrame::Reflow(nsIPresContext& aPresContext,
if (NS_OK != result) {
NS_ASSERTION(0, "widget initialization failed");
aStatus = NS_FRAME_NOT_COMPLETE;
NS_IF_RELEASE(parView);
NS_IF_RELEASE(viewMan);
return NS_OK;
}
@ -293,7 +296,6 @@ nsInputFrame::Reflow(nsIPresContext& aPresContext,
NS_IF_RELEASE(parView);
NS_IF_RELEASE(viewMan);
NS_IF_RELEASE(presShell);
}
else {
GetDesiredSize(&aPresContext, aReflowState, aDesiredSize, mWidgetSize);