if (m_prefs) nsServiceManager::ReleaseService(kPrefServiceCID, m_prefs); UnloadAccounts(); NS_IF_RELEASE(m_accounts);
nsresult rv;  if(!m_haveShutdown) { Shutdown();   NS_WITH_SERVICE (nsIObserverService, observerService, NS_OBSERVERSERVICE_CONTRACTID, &rv); if (NS_SUCCEEDED(rv)) { nsAutoString topic; topic.AssignWithConversion(NS_XPCOM_SHUTDOWN_OBSERVER_ID); observerService->RemoveObserver(this, topic.GetUnicode()); } }
nsMsgAccountManager::~nsMsgAccountManager(){    if (m_prefs) nsServiceManager::ReleaseService(kPrefServiceCID, m_prefs);  UnloadAccounts();  NS_IF_RELEASE(m_accounts);}