if (nsnull != mObservers) { for (PRInt32 i = mObservers->Count() - 1; i >= 0; --i) { nsIRDFObserver* obs = (nsIRDFObserver*) mObservers->ElementAt(i); NS_RELEASE(obs); } delete mObservers; mObservers = nsnull; }
delete mObservers;
RelatedLinksDataSource::~RelatedLinksDataSource (void){	gRDFService->UnregisterDataSource(this);	if (nsnull != mURI)	{		PL_strfree(mURI);		mURI = nsnull;	}	if (nsnull != mRelatedLinksURL)	{		PL_strfree(mRelatedLinksURL);		mRelatedLinksURL = nsnull;	}	if (--gRefCnt == 0)	{		NS_RELEASE(kNC_RelatedLinksRoot);		NS_RELEASE(kNC_Child);		NS_RELEASE(kNC_Name);		NS_RELEASE(kNC_URL);		NS_RELEASE(kNC_pulse);		NS_RELEASE(kNC_FTPObject);		NS_RELEASE(kRDF_InstanceOf);		NS_RELEASE(kRDF_type);		if (nsnull != mObservers)		{			for (PRInt32 i = mObservers->Count() - 1; i >= 0; --i)			{				nsIRDFObserver* obs = (nsIRDFObserver*) mObservers->ElementAt(i);				NS_RELEASE(obs);			}			delete mObservers;			mObservers = nsnull;		}		if (nsnull != mInner)		{			NS_RELEASE(mInner);			mInner = nsnull;		}		nsServiceManager::ReleaseService(kRDFServiceCID, gRDFService);		gRDFService = nsnull;	}}