nsString s(uri); char* cstr = s.ToNewCString(); nsresult rv = GetResource(cstr, resource); delete[] cstr;
nsString uriStr(aURI); char buf[128]; char* uri = buf;  if (uriStr.Length() >= sizeof(buf)) uri = new char[uriStr.Length() + 1];  uriStr.ToCString(uri, uriStr.Length() + 1);  nsresult rv = GetResource(uri, aResource);  if (uri != buf) delete[] uri;
ServiceImpl::GetUnicodeResource(const PRUnichar* uri, nsIRDFResource** resource){    nsString s(uri);    char* cstr = s.ToNewCString();    nsresult rv = GetResource(cstr, resource);    delete[] cstr;    return rv;}