nsCOMPtr<nsIMsgAccountManager> am = do_QueryReferent(mAccountManager); if (am) am->RemoveIncomingServerListener(this);  if (--gAccountManagerResourceRefCnt == 0) { NS_IF_RELEASE(kNC_Child); NS_IF_RELEASE(kNC_Name); NS_IF_RELEASE(kNC_FolderTreeName); NS_IF_RELEASE(kNC_NameSort); NS_IF_RELEASE(kNC_FolderTreeNameSort); NS_IF_RELEASE(kNC_PageTag); NS_IF_RELEASE(kNC_IsDefaultServer); NS_IF_RELEASE(kNC_Account); NS_IF_RELEASE(kNC_Server); NS_IF_RELEASE(kNC_Identity); NS_IF_RELEASE(kNC_PageTitleMain); NS_IF_RELEASE(kNC_PageTitleServer); NS_IF_RELEASE(kNC_PageTitleCopies); NS_IF_RELEASE(kNC_PageTitleAdvanced); NS_IF_RELEASE(kNC_PageTitleSMTP); NS_IF_RELEASE(kTrueLiteral);  NS_IF_RELEASE(kNC_AccountRoot);    NS_IF_RELEASE(kNC_Settings);   kDefaultServerAtom=nsnull; mAccountArcsOut = nsnull; mAccountRootArcsOut = nsnull; }
if (getRDFService()) nsServiceManager::ReleaseService(kRDFServiceCID, getRDFService(), this);
nsMsgAccountManagerDataSource::~nsMsgAccountManagerDataSource(){    nsCOMPtr<nsIMsgAccountManager> am = do_QueryReferent(mAccountManager);    if (am)      am->RemoveIncomingServerListener(this);    	if (--gAccountManagerResourceRefCnt == 0)	{      NS_IF_RELEASE(kNC_Child);      NS_IF_RELEASE(kNC_Name);      NS_IF_RELEASE(kNC_FolderTreeName);      NS_IF_RELEASE(kNC_NameSort);      NS_IF_RELEASE(kNC_FolderTreeNameSort);      NS_IF_RELEASE(kNC_PageTag);      NS_IF_RELEASE(kNC_IsDefaultServer);      NS_IF_RELEASE(kNC_Account);      NS_IF_RELEASE(kNC_Server);      NS_IF_RELEASE(kNC_Identity);      NS_IF_RELEASE(kNC_PageTitleMain);      NS_IF_RELEASE(kNC_PageTitleServer);      NS_IF_RELEASE(kNC_PageTitleCopies);      NS_IF_RELEASE(kNC_PageTitleAdvanced);      NS_IF_RELEASE(kNC_PageTitleSMTP);      NS_IF_RELEASE(kTrueLiteral);            NS_IF_RELEASE(kNC_AccountRoot);            // eventually these need to exist in some kind of array      // that's easily extensible      NS_IF_RELEASE(kNC_Settings);      kDefaultServerAtom=nsnull;      mAccountArcsOut = nsnull;      mAccountRootArcsOut = nsnull;	}}