delete it;
NS_RELEASE(it);
NS_NewXMLElement(nsIContent** aInstancePtrResult, nsINodeInfo *aNodeInfo){  nsXMLElement* it = new nsXMLElement();  if (!it) {    return NS_ERROR_OUT_OF_MEMORY;  }  nsresult rv = it->Init(aNodeInfo);  if (NS_FAILED(rv)) {    delete it;    return rv;  }  *aInstancePtrResult = NS_STATIC_CAST(nsIXMLContent *, it);  NS_ADDREF(*aInstancePtrResult);  return NS_OK;}