delete spec;
NS_RELEASE(spec);
PRIVATE nsresult cookie_ProfileDirectory(nsFileSpec& dirSpec) {  nsIFileSpec* spec =     NS_LocateFileOrDirectory(nsSpecialFileSpec::App_UserProfileDirectory50);  if (!spec) {    return NS_ERROR_FAILURE;  }  nsresult res = spec->GetFileSpec(&dirSpec);  delete spec;  return res;}