if (child) { PRInt32 refCnt = child->GetRefCount(); NS_RELEASE(child); if (refCnt > 1) { externalRefsToChildren = PR_TRUE; break; }
if (child && (child->GetRefCount() > 1)) { externalRefsToChildren = PR_TRUE; break;
nsrefcnt nsForm::Release(){  --mRefCnt;  int numChildren = GetFormControlCount();  PRBool externalRefsToChildren = PR_FALSE;  // are there refs to any children besides my ref  for (int i = 0; i < numChildren; i++) {    nsIFormControl* child = GetFormControlAt(i);    if (child) {      PRInt32 refCnt = child->GetRefCount();      NS_RELEASE(child);      if (refCnt > 1) {        externalRefsToChildren = PR_TRUE;        break;      }    }  }  if (!externalRefsToChildren && ((int)mRefCnt == numChildren)) {    mRefCnt = 0;    delete this;     return 0;  }   return mRefCnt;}