From 931e45da01d191de21cf4866d12fcd74408e4a66 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Sat, 15 Aug 1998 16:25:33 +0000 Subject: [PATCH] Destructor now releases ref to image maps git-svn-id: svn://10.0.0.236/trunk@8076 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/document/src/nsHTMLDocument.cpp | 9 +++++++-- mozilla/layout/html/document/src/nsHTMLDocument.cpp | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index 83f37b24d3c..d3f0e4ccd03 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -83,8 +83,8 @@ nsHTMLDocument::nsHTMLDocument() nsHTMLDocument::~nsHTMLDocument() { // XXX Temporary code till forms become real content - int i, count = mTempForms.Count(); - for (i = 0; i < count; i++) { + PRInt32 i; + for (i = 0; i < mTempForms.Count(); i++) { nsIFormManager *form = (nsIFormManager *)mTempForms.ElementAt(i); if (nsnull != form) { NS_RELEASE(form); @@ -99,6 +99,11 @@ nsHTMLDocument::~nsHTMLDocument() NS_IF_RELEASE(mForms); NS_IF_RELEASE(mAttrStyleSheet); NS_IF_RELEASE(mParser); + for (i = 0; i < mImageMaps.Count(); i++) { + nsIImageMap* map = (nsIImageMap*)mImageMaps.ElementAt(i); + + NS_RELEASE(map); + } // XXX don't bother doing this until the dll is unloaded??? // nsHTMLAtoms::ReleaseAtoms(); } diff --git a/mozilla/layout/html/document/src/nsHTMLDocument.cpp b/mozilla/layout/html/document/src/nsHTMLDocument.cpp index 83f37b24d3c..d3f0e4ccd03 100644 --- a/mozilla/layout/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/layout/html/document/src/nsHTMLDocument.cpp @@ -83,8 +83,8 @@ nsHTMLDocument::nsHTMLDocument() nsHTMLDocument::~nsHTMLDocument() { // XXX Temporary code till forms become real content - int i, count = mTempForms.Count(); - for (i = 0; i < count; i++) { + PRInt32 i; + for (i = 0; i < mTempForms.Count(); i++) { nsIFormManager *form = (nsIFormManager *)mTempForms.ElementAt(i); if (nsnull != form) { NS_RELEASE(form); @@ -99,6 +99,11 @@ nsHTMLDocument::~nsHTMLDocument() NS_IF_RELEASE(mForms); NS_IF_RELEASE(mAttrStyleSheet); NS_IF_RELEASE(mParser); + for (i = 0; i < mImageMaps.Count(); i++) { + nsIImageMap* map = (nsIImageMap*)mImageMaps.ElementAt(i); + + NS_RELEASE(map); + } // XXX don't bother doing this until the dll is unloaded??? // nsHTMLAtoms::ReleaseAtoms(); }