Fix for 149754. cleaner xpcom shutdown. r=rpotts, sr=shaver

This commit is contained in:
dougt%netscape.com 2002-06-11 19:38:41 +00:00
parent a92c2a61bd
commit e202a87635
2 changed files with 3 additions and 4 deletions

View File

@ -42,17 +42,15 @@
static nsIMemory* gMemory = nsnull;
static PRBool gHasMemoryShutdown = PR_FALSE;
static NS_METHOD FreeGlobalMemory(void)
{
NS_IF_RELEASE(gMemory);
gHasMemoryShutdown = PR_TRUE;
return NS_OK;
}
#define ENSURE_ALLOCATOR \
(gMemory ? PR_TRUE : !gHasMemoryShutdown && SetupGlobalMemory())
(gMemory ? PR_TRUE : (PRBool) SetupGlobalMemory())
static nsIMemory*
SetupGlobalMemory()

View File

@ -590,7 +590,8 @@ nsDirectoryService::~nsDirectoryService()
NS_IF_RELEASE(nsDirectoryService::sSystemDirectory);
#endif
// clear the global
mService = nsnull;
}