Fix a webshell leak! improper nsCOMPtr useage in DestroyChildren was causing us to leak

all child webshells!!! uhuh...that couldn't have been good


git-svn-id: svn://10.0.0.236/trunk@55112 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mscott%netscape.com
1999-12-02 23:46:00 +00:00
parent 6080853d5d
commit 82c4ad3f35
2 changed files with 6 additions and 2 deletions

View File

@@ -744,10 +744,12 @@ nsWebShell::DestroyChildren()
{
PRInt32 i, n = mChildren.Count();
for (i = 0; i < n; i++) {
nsCOMPtr<nsIDocShell> shell = (nsIDocShell*) mChildren.ElementAt(i);
nsIDocShell * shell = (nsIDocShell*) mChildren.ElementAt(i);
shell->SetParent(nsnull);
nsCOMPtr<nsIBaseWindow> shellWin(do_QueryInterface(shell));
shellWin->Destroy();
NS_RELEASE(shell);
}
mChildren.Clear();
}