nsServiceManager::ReleaseService(kRDFContainerUtilsCID, gRDFContainerUtils); nsServiceManager::ReleaseService(kRDFServiceCID, gRDFService);
if (gRDFContainerUtils) { nsServiceManager::ReleaseService(kRDFContainerUtilsCID, gRDFContainerUtils); gRDFContainerUtils = nsnull; }  if (gRDFService) { nsServiceManager::ReleaseService(kRDFServiceCID, gRDFService); gRDFService = nsnull; }  NS_IF_RELEASE(kRDF_nextVal);
RDFContainerImpl::~RDFContainerImpl(){#ifdef DEBUG_REFS    --gInstanceCount;    fprintf(stdout, "%d - RDF: RDFContainerImpl\n", gInstanceCount);#endif    NS_IF_RELEASE(mContainer);    NS_IF_RELEASE(mDataSource);    if (--gRefCnt == 0) {        nsServiceManager::ReleaseService(kRDFContainerUtilsCID, gRDFContainerUtils);        nsServiceManager::ReleaseService(kRDFServiceCID, gRDFService);    }}