From 870f1d7facbfc401861112f61bb108c8358a2940 Mon Sep 17 00:00:00 2001 From: "rjc%netscape.com" Date: Sun, 19 Mar 2000 10:09:14 +0000 Subject: [PATCH] Don't leak static mLoadGroup. --- xpfe/components/search/src/nsInternetSearchService.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xpfe/components/search/src/nsInternetSearchService.cpp b/xpfe/components/search/src/nsInternetSearchService.cpp index 98567b26e92..e87e9175d24 100755 --- a/xpfe/components/search/src/nsInternetSearchService.cpp +++ b/xpfe/components/search/src/nsInternetSearchService.cpp @@ -249,7 +249,6 @@ class InternetSearchDataSource : public nsIInternetSearchService, private: static PRInt32 gRefCnt; static PRBool mEngineListBuilt; -static nsCOMPtr mLoadGroup; // pseudo-constants static nsIRDFResource *kNC_SearchResult; @@ -290,6 +289,7 @@ static nsCOMPtr mLoadGroup; protected: static nsIRDFDataSource *mInner; + static nsCOMPtr mLoadGroup; static nsCOMPtr categoryDataSource; friend NS_IMETHODIMP NS_NewInternetSearchService(nsISupports* aOuter, REFNSIID aIID, void** aResult); @@ -487,12 +487,14 @@ InternetSearchDataSource::~InternetSearchDataSource (void) NS_IF_RELEASE(mInner); + mLoadGroup = nsnull; + categoryDataSource = nsnull; + if (gRDFService) { nsServiceManager::ReleaseService(kRDFServiceCID, gRDFService); gRDFService = nsnull; } - categoryDataSource = NULL; } }