Count some classes for the leak stats. r=warren@netscape.com
git-svn-id: svn://10.0.0.236/trunk@69783 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -160,12 +160,15 @@ nsCID_Destroy(nsHashKey *aKey, void *aData, void* closure);
|
||||
// nsFactoryEntry
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(nsFactoryEntry)
|
||||
|
||||
nsFactoryEntry::nsFactoryEntry(const nsCID &aClass,
|
||||
const char *aLocation,
|
||||
const char *aType,
|
||||
nsIComponentLoader *aLoader)
|
||||
: cid(aClass), factory(nsnull), loader(aLoader)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsFactoryEntry);
|
||||
loader = aLoader;
|
||||
type = aType;
|
||||
location = aLocation;
|
||||
@@ -175,11 +178,13 @@ nsFactoryEntry::nsFactoryEntry(const nsCID &aClass, nsIFactory *aFactory)
|
||||
: cid(aClass), loader(nsnull)
|
||||
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsFactoryEntry);
|
||||
factory = aFactory;
|
||||
}
|
||||
|
||||
nsFactoryEntry::~nsFactoryEntry(void)
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsFactoryEntry);
|
||||
factory = 0;
|
||||
loader = 0;
|
||||
}
|
||||
|
||||
@@ -102,17 +102,25 @@ static PRIntn PR_CALLBACK _hashEnumerate(PLHashEntry *he, PRIntn i, void *arg)
|
||||
//
|
||||
// HashKey
|
||||
//
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(nsHashKey)
|
||||
|
||||
nsHashKey::nsHashKey(void)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsHashKey);
|
||||
}
|
||||
|
||||
nsHashKey::~nsHashKey(void)
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsHashKey);
|
||||
}
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(nsHashtable)
|
||||
|
||||
nsHashtable::nsHashtable(PRUint32 aInitSize, PRBool threadSafe)
|
||||
: mLock(NULL)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsHashtable);
|
||||
hashtable = PL_NewHashTable(aInitSize,
|
||||
_hashValue,
|
||||
_hashKeyCompare,
|
||||
@@ -132,6 +140,7 @@ nsHashtable::nsHashtable(PRUint32 aInitSize, PRBool threadSafe)
|
||||
}
|
||||
|
||||
nsHashtable::~nsHashtable() {
|
||||
MOZ_COUNT_DTOR(nsHashtable);
|
||||
PL_HashTableDestroy(hashtable);
|
||||
if (mLock) PR_DestroyLock(mLock);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user