RemoveFormControl(child, PR_FALSE); child->SetFormManager(nsnull, PR_FALSE); NS_RELEASE(child);
if (child) { RemoveFormControl(child, PR_FALSE); child->SetFormManager(nsnull, PR_FALSE); }
nsForm::~nsForm(){  NS_IF_RELEASE(mTag);  int numChildren = GetFormControlCount();  for (int i = 0; i < numChildren; i++) {    nsIFormControl* child = GetFormControlAt(i);    RemoveFormControl(child, PR_FALSE);    child->SetFormManager(nsnull, PR_FALSE);    NS_RELEASE(child);  }  if (nsnull != mAction) delete mAction;  if (nsnull != mEncoding) delete mEncoding;  if (nsnull != mTarget) delete mTarget;  RemoveRadioGroups();  if (nsnull != mElements) {    mElements->ReleaseForm();    NS_RELEASE(mElements);  }}