NS_RELEASE(kContainerAtom); NS_RELEASE(kItemContentsGeneratedAtom);
NS_IF_RELEASE(kContainerAtom); NS_IF_RELEASE(kContainmentAtom); NS_IF_RELEASE(kEmptyAtom); NS_IF_RELEASE(kIdAtom); NS_IF_RELEASE(kIgnoreAtom); NS_IF_RELEASE(kInstanceOfAtom); NS_IF_RELEASE(kIsContainerAtom); NS_IF_RELEASE(kIsEmptyAtom); NS_IF_RELEASE(kMenuAtom); NS_IF_RELEASE(kMenuPopupAtom); NS_IF_RELEASE(kOpenAtom); NS_IF_RELEASE(kParentAtom); NS_IF_RELEASE(kPersistAtom); NS_IF_RELEASE(kPropertyAtom); NS_IF_RELEASE(kResourceAtom); NS_IF_RELEASE(kRuleAtom); NS_IF_RELEASE(kTemplateAtom); NS_IF_RELEASE(kTextAtom); NS_IF_RELEASE(kTreeAtom); NS_IF_RELEASE(kTreeChildrenAtom); NS_IF_RELEASE(kTreeItemAtom); NS_IF_RELEASE(kURIAtom); NS_IF_RELEASE(kValueAtom); NS_IF_RELEASE(kXULContentsGeneratedAtom);
RDFGenericBuilderImpl::~RDFGenericBuilderImpl(void){    NS_IF_RELEASE(mRoot);    if (mDB) {        mDB->RemoveObserver(this);        NS_RELEASE(mDB);    }    // NS_IF_RELEASE(mDocument) not refcounted    --gRefCnt;    if (gRefCnt == 0) {        NS_RELEASE(kContainerAtom);        NS_RELEASE(kItemContentsGeneratedAtom);        NS_RELEASE(kIdAtom);        NS_RELEASE(kOpenAtom);        NS_RELEASE(kResourceAtom);        NS_RELEASE(kContainmentAtom);        NS_RELEASE(kNaturalOrderPosAtom);        NS_RELEASE(kSubcontainmentAtom);        NS_RELEASE(kTreeTemplateAtom);        NS_RELEASE(kRuleAtom);        NS_RELEASE(kTempAtom);        NS_RELEASE(kTreeContentsGeneratedAtom);        NS_RELEASE(kTextAtom);        NS_RELEASE(kPropertyAtom);        NS_RELEASE(kInstanceOfAtom);        NS_RELEASE(kNC_Title);        NS_RELEASE(kNC_Column);        nsServiceManager::ReleaseService(kRDFServiceCID, gRDFService);	nsServiceManager::ReleaseService(kXULSortServiceCID, XULSortService);        NS_RELEASE(gNameSpaceManager);    }    if (mTimer)    {        mTimer->Cancel();        NS_RELEASE(mTimer);        mTimer = nsnull;    }}