Stop(); if (nsnull != mParent) { #ifdef NECKO mParent->RemoveChildGroup(GetLoadGroup()); #else mParent->RemoveChildGroup(this); #endif NS_RELEASE(mParent);
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();
nsDocLoaderImpl::~nsDocLoaderImpl(){    Stop();    if (nsnull != mParent) {#ifdef NECKO        mParent->RemoveChildGroup(GetLoadGroup());#else        mParent->RemoveChildGroup(this);#endif        NS_RELEASE(mParent);    }#ifdef NECKO    NS_IF_RELEASE(mDocumentChannel);#else    NS_IF_RELEASE(mDocumentUrl);#endif    PR_LOG(gDocLoaderLog, PR_LOG_DEBUG,            ("DocLoader:%p: deleted.\n", this));#ifndef NECKO    NS_PRECONDITION((0 == mChildGroupList.Count()), "Document loader has children...");#endif}