delete url;
NS_RELEASE(url);
nsStringBundle::OpenInputStream(nsString2& aURLStr, nsIInputStream*& in) {  nsresult ret;#ifndef NECKO  nsINetService* pNetService = nsnull;  ret = nsServiceManager::GetService(kNetServiceCID,                                     kINetServiceIID, (nsISupports**) &pNetService);  /* get the url   */  nsIURI    *url = nsnull;  ret = pNetService->CreateURL(&url, aURLStr, nsnull, nsnull,                               nsnull);  if (NS_FAILED(ret)) {#ifdef NS_DEBUG    char *s = aURLStr.ToNewCString();    printf("\n** cannot create URL for %s\n", s?s:"null");    delete s;#endif    return ret;  }  //  ret = pNetService->OpenBlockingStream(url, nsnull, &in);  delete url;#ifdef NS_DEBUG  if (NS_FAILED(ret) || !in) {    char *s = aURLStr.ToNewCString();    printf("\n** cannot open stream: %s\n", s?s:"null");    delete s;  }#endif#else // NECKO  nsIURI* uri;  ret = NS_NewURI(&uri, aURLStr);  if (NS_FAILED(ret)) return ret;  ret = NS_OpenURI(&in, uri);  NS_RELEASE(uri);#endif // NECKO  return ret;}