MOZ_COUNT_DTOR(CSSStyleSheetImpl); #ifdef DEBUG_REFS --gInstanceCount; fprintf(stdout, "%d - CSSStyleSheet\n", gInstanceCount); #endif
CSSStyleSheetImpl::~CSSStyleSheetImpl(){  MOZ_COUNT_DTOR(CSSStyleSheetImpl);#ifdef DEBUG_REFS  --gInstanceCount;  fprintf(stdout, "%d - CSSStyleSheet\n", gInstanceCount);#endif  NS_IF_RELEASE(mMedia);  if (mFirstChild) {    CSSStyleSheetImpl* child = mFirstChild;    do {      child->mParent = nsnull;      child = child->mNext;    } while (child);    NS_RELEASE(mFirstChild);  }  NS_IF_RELEASE(mNext);  if (nsnull != mRuleCollection) {    mRuleCollection->DropReference();    NS_RELEASE(mRuleCollection);  }  if (nsnull != mImportsCollection) {    mImportsCollection->DropReference();    NS_RELEASE(mImportsCollection);  }  mInner->RemoveSheet(this);  // XXX The document reference is not reference counted and should  // not be released. The document will let us know when it is going  // away.}