delete mRestoreState; mRestoreState = nsnull;
NS_RELEASE(mRestoreState);
nsHTMLSelectElement::DoneAddingChildren(){  mIsDoneAddingChildren = PR_TRUE;  nsISelectControlFrame* selectFrame = GetSelectFrame();  // If we foolishly tried to restore before we were done adding  // content, restore the rest of the options proper-like  if (mRestoreState) {    RestoreStateTo(mRestoreState);    delete mRestoreState;    mRestoreState = nsnull;  }  // Notify the frame  if (selectFrame) {    selectFrame->DoneAddingChildren(PR_TRUE);  }  // Restore state  RestoreFormControlState(this, this);  // Now that we're done, select something (if it's a single select something  // must be selected)  CheckSelectSomething();  return NS_OK;}