ClearWeakReferences();  Destroy();  PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, ("DocLoader:%p: deleted.\n", this));  PRInt32 count = mChildList.Count();    if (count > 0) { for (PRInt32 i=0; i < count; i++) { nsCOMPtr<nsIDocumentLoader> loader = mChildList.ObjectAt(i);  if (loader) loader->ClearParentDocLoader(); } mChildList.Clear();
Stop(); if (nsnull != mParent) { mParent->RemoveChildGroup(this); NS_RELEASE(mParent);
nsDocLoaderImpl::~nsDocLoaderImpl(){		/*			|ClearWeakReferences()| here is intended to prevent people holding weak references			from re-entering this destructor since |QueryReferent()| will |AddRef()| me, and the			subsequent |Release()| will try to destroy me.  At this point there should be only			weak references remaining (otherwise, we wouldn't be getting destroyed).			An alternative would be incrementing our refcount (consider it a compressed flag			saying "Don't re-destroy.").  I haven't yet decided which is better. [scc]		*/  ClearWeakReferences();  Destroy();  PR_LOG(gDocLoaderLog, PR_LOG_DEBUG,         ("DocLoader:%p: deleted.\n", this));  PRInt32 count = mChildList.Count();  // if the doc loader still has children...we need to enumerate the  // children and make them null out their back ptr to the parent doc  // loader  if (count > 0)  {    for (PRInt32 i=0; i < count; i++)    {      nsCOMPtr<nsIDocumentLoader> loader = mChildList.ObjectAt(i);      if (loader)        loader->ClearParentDocLoader();    }    mChildList.Clear();  }  if (mRequestInfoHash.ops) {    PL_DHashTableFinish(&mRequestInfoHash);  }}