NS_RELEASE(childSheet);
void CSSParserImpl::ProcessImport(const nsString& aURLSpec){  // XXX probably need a way to encode unicode junk for the part of  // the url that follows a "?"  char* cp = aURLSpec.ToNewCString();  nsIURL* url;  nsresult rv = NS_NewURL(&url, mURL, cp);  delete cp;  if (NS_OK != rv) {    // import url is bad    // XXX log this somewhere for easier web page debugging    return;  }  if (PR_FALSE == mSheet->ContainsStyleSheet(url)) { // don't allow circular references    PRInt32 ec;    nsIInputStream* in = url->Open(&ec);    if (nsnull == in) {      // failure to make connection      // XXX log this somewhere for easier web page debugging    }    else {      nsIUnicharInputStream* uin;      rv = NS_NewConverterStream(&uin, nsnull, in);      if (NS_OK != rv) {        // XXX no iso-latin-1 converter? out of memory?        NS_RELEASE(in);      }      else {        NS_RELEASE(in);        // Create a new parse to parse the import.         if (NS_OK == rv) {          CSSParserImpl *parser = new CSSParserImpl();          nsIStyleSheet* childSheet;          rv = parser->Parse(uin, url, childSheet);          NS_RELEASE(parser);          if ((NS_OK == rv) && (nsnull != childSheet)) {            nsICSSStyleSheet* cssChild = nsnull;            if (NS_OK == childSheet->QueryInterface(kICSSStyleSheetIID, (void**)&cssChild)) {              mSheet->AppendStyleSheet(cssChild);              NS_RELEASE(cssChild);            }          }          NS_RELEASE(childSheet);        }        NS_RELEASE(uin);      }    }  }  NS_RELEASE(url);}