From 1b3f6ef567a7b61ff6e8b7981ebb86d76f9cdc1d Mon Sep 17 00:00:00 2001 From: "dbaron%fas.harvard.edu" Date: Mon, 15 May 2000 13:11:06 +0000 Subject: [PATCH] Fix leak of namespace manager. r=waterson@netscape.com --- content/xul/document/src/nsXULDocument.cpp | 5 +++++ rdf/content/src/nsXULDocument.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/content/xul/document/src/nsXULDocument.cpp b/content/xul/document/src/nsXULDocument.cpp index 5c7e91d4291..5283984e930 100644 --- a/content/xul/document/src/nsXULDocument.cpp +++ b/content/xul/document/src/nsXULDocument.cpp @@ -496,6 +496,11 @@ nsXULDocument::~nsXULDocument() NS_IF_RELEASE(gHTMLElementFactory); NS_IF_RELEASE(gXMLElementFactory); + if (gNameSpaceManager) { + nsServiceManager::ReleaseService(kNameSpaceManagerCID, gNameSpaceManager); + gNameSpaceManager = nsnull; + } + if (gXULUtils) { nsServiceManager::ReleaseService(kXULContentUtilsCID, gXULUtils); gXULUtils = nsnull; diff --git a/rdf/content/src/nsXULDocument.cpp b/rdf/content/src/nsXULDocument.cpp index 5c7e91d4291..5283984e930 100644 --- a/rdf/content/src/nsXULDocument.cpp +++ b/rdf/content/src/nsXULDocument.cpp @@ -496,6 +496,11 @@ nsXULDocument::~nsXULDocument() NS_IF_RELEASE(gHTMLElementFactory); NS_IF_RELEASE(gXMLElementFactory); + if (gNameSpaceManager) { + nsServiceManager::ReleaseService(kNameSpaceManagerCID, gNameSpaceManager); + gNameSpaceManager = nsnull; + } + if (gXULUtils) { nsServiceManager::ReleaseService(kXULContentUtilsCID, gXULUtils); gXULUtils = nsnull;