diff --git a/xpfe/components/find/src/nsFindModule.cpp b/xpfe/components/find/src/nsFindModule.cpp index 7facd7af56f0..6b740c6b1436 100644 --- a/xpfe/components/find/src/nsFindModule.cpp +++ b/xpfe/components/find/src/nsFindModule.cpp @@ -8,9 +8,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsFindService) -NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIFindService, nsFindService::GetSingleton) - - static const nsModuleComponentInfo gComponents[] = { { "Find Service", @@ -18,16 +15,7 @@ static const nsModuleComponentInfo gComponents[] = { NS_FIND_SERVICE_CONTRACTID, nsFindServiceConstructor } - }; - -PR_STATIC_CALLBACK(void) -nsFindModuleDtor(nsIModule* self) -{ - // Release our singletons - nsFindService::FreeSingleton(); -} - -NS_IMPL_NSGETMODULE_WITH_DTOR(nsFindComponent, gComponents, nsFindModuleDtor) +NS_IMPL_NSGETMODULE(nsFindComponent, gComponents) diff --git a/xpfe/components/find/src/nsFindService.cpp b/xpfe/components/find/src/nsFindService.cpp index 35bbe22ae523..75f17caa824a 100644 --- a/xpfe/components/find/src/nsFindService.cpp +++ b/xpfe/components/find/src/nsFindService.cpp @@ -138,24 +138,3 @@ NS_IMETHODIMP nsFindService::SetMatchCase(PRBool aMatchCase) return NS_OK; } - -nsFindService* nsFindService::gFindService; - -nsFindService* -nsFindService::GetSingleton() -{ - if (!gFindService) { - gFindService = new nsFindService(); - if (gFindService) - NS_ADDREF(gFindService); - } - NS_IF_ADDREF(gFindService); - return gFindService; -} - -void -nsFindService::FreeSingleton() -{ - NS_IF_RELEASE(gFindService); -} - diff --git a/xpfe/components/find/src/nsFindService.h b/xpfe/components/find/src/nsFindService.h index fd6040219e63..a2501c6e9c5a 100644 --- a/xpfe/components/find/src/nsFindService.h +++ b/xpfe/components/find/src/nsFindService.h @@ -65,14 +65,7 @@ public: NS_DECL_ISUPPORTS NS_DECL_NSIFINDSERVICE - - static nsFindService* GetSingleton(); - static void FreeSingleton(); - -protected: - - static nsFindService* gFindService; - + protected: nsString mSearchString; @@ -82,5 +75,4 @@ protected: PRPackedBool mWrapFind; PRPackedBool mEntireWord; PRPackedBool mMatchCase; - };