NS_WITH_SERVICE(nsIProfile, profileMgr, kProfileCID, &rv); if (NS_SUCCEEDED(rv)) profileMgr->Shutdown();
{      NS_WITH_SERVICE(nsIProfile, profileMgr, kProfileCID, &rv); if (NS_SUCCEEDED(rv)) profileMgr->Shutdown();   }
int main(int argc, char* argv[]){  nsresult rv;      if( !NS_CanRun() )    return 1;   NS_ShowSplashScreen();  rv = NS_InitXPCOM(NULL);  NS_ASSERTION( NS_SUCCEEDED(rv), "NS_InitXPCOM failed" );  nsresult result = main1( argc, argv );	  // this is supposed to happen automatically when XPCOM shuts down, but  // that doesn't always occur!  NS_WITH_SERVICE(nsIProfile, profileMgr, kProfileCID, &rv);  if (NS_SUCCEEDED(rv))    profileMgr->Shutdown();  // calling this explicitly will cut down on a large number of leaks we're  // seeing:    #if 0  if ( unsigned long count = NS_TotalWebShellsInExistence() )  {    printf("!!!Warning: there are still %l instances of nsWebShell outstanding.  OK?\n", count);    char cc;    scanf("%c", &cc);  }#endif  rv = NS_ShutdownXPCOM( NULL );  NS_ASSERTION(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed");  return TranslateReturnValue( result );}