NS_RELEASE(option);
NS_RELEASE(child);
nsSelect::Reset() {//  PRBool allowMultiple;//  super::GetAttribute(nsHTMLAtoms::multiple, allowMultiple);  PRInt32 numChildren = ChildCount();  nsIListWidget* list;  nsresult stat = mWidget->QueryInterface(kListWidgetIID, (void **) &list);  NS_ASSERTION((NS_OK == stat), "invalid widget");  list->Deselect();  PRInt32 selIndex = -1;  for (int i = 0; i < numChildren; i++) {    nsOption* option = (nsOption*)ChildAt(i);  // YYY this had better be an option     PRInt32 selAttr;    ((nsInput *)option)->GetAttribute(nsHTMLAtoms::selected, selAttr);    if (ATTR_NOTSET != selAttr) {      list->SelectItem(i);      selIndex = i;      if (!mMultiple) {        break;        }    }    NS_RELEASE(option);  // YYY remove this comment if ok  }  // if none were selected, select 1st one if we are a combo box  if (mIsComboBox && (numChildren > 0) && (selIndex < 0)) {    list->SelectItem(0);  }}  