setting parent to null to make sure there are no dnagling pointers from children

to their parents
b=44266, r=jst
This commit is contained in:
rods%netscape.com 2000-07-11 22:17:38 +00:00
Родитель b2966d97ba
Коммит 6f13208339
2 изменённых файлов: 2 добавлений и 0 удалений

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

@ -3233,6 +3233,7 @@ nsGenericHTMLContainerElement::~nsGenericHTMLContainerElement()
PRInt32 n = mChildren.Count();
for (PRInt32 i = 0; i < n; i++) {
nsIContent* kid = (nsIContent *)mChildren.ElementAt(i);
kid->SetParent(nsnull);
NS_RELEASE(kid);
}
}

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

@ -3233,6 +3233,7 @@ nsGenericHTMLContainerElement::~nsGenericHTMLContainerElement()
PRInt32 n = mChildren.Count();
for (PRInt32 i = 0; i < n; i++) {
nsIContent* kid = (nsIContent *)mChildren.ElementAt(i);
kid->SetParent(nsnull);
NS_RELEASE(kid);
}
}