rlist->AddRef();
NS_ADDREF(rlist);
nsresult NS_NewDomSelection(nsISelection **aDomSelection){  nsTypedSelection *rlist = new nsTypedSelection;  if (!rlist)    return NS_ERROR_OUT_OF_MEMORY;  *aDomSelection = (nsISelection *)rlist;  rlist->AddRef();  return NS_OK;}