r=dp; cleanup xpcom library too during shutdown to reduce global leaks

This commit is contained in:
kipp%netscape.com 1999-10-05 00:07:39 +00:00
Родитель a3d7e7cf09
Коммит b18e3d2122
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -47,6 +47,7 @@
#include "nsProxyEventPrivate.h" // access to the impl of nsProxyObjectManager for the generic factory registration.
#include "nsFileSpecImpl.h"
#include "xptinfo.h"
#include "nsThread.h"
@ -468,6 +469,9 @@ nsresult NS_COM NS_ShutdownXPCOM(nsIServiceManager* servMgr)
{
nsrefcnt cnt;
// Release our own singletons...
XPTI_FreeInterfaceInfoManager();
// We may have AddRef'd for the caller of NS_InitXPCOM, so release it
// here again:
@ -484,6 +488,13 @@ nsresult NS_COM NS_ShutdownXPCOM(nsIServiceManager* servMgr)
_FreeAutoLockStatics();
#endif
NS_PurgeAtomTable();
#ifdef DEBUG_kipp
nsTraceRefcnt::DumpLeaks(stderr);
nsTraceRefcnt::FlushCtorRegistry();
#endif
#ifdef GC_LEAK_DETECTOR
// Shutdown the GC.
NSShutdownGarbageCollector();