delete doomed;
doomed->mNext = doomed->mInvNext = nsnull; doomed->Release();
InMemoryDataSource::Sweep(){    SweepInfo info = { nsnull, mReverseArcs };    {        // Remove all the assertions while holding the lock, but don't notify anyone.        NS_AUTOLOCK(mLock);        PL_HashTableEnumerateEntries(mForwardArcs, SweepForwardArcsEntries, &info);    }    // Now we've left the autolock. Do the notification.    Assertion* as = info.mUnassertList;    while (as) {#ifdef PR_LOGGING        LogOperation("SWEEP", as->mSource, as->mProperty, as->mTarget, as->mTruthValue);#endif                if (mObservers) {            nsresult rv;            PRUint32 count;            rv = mObservers->Count(&count);            if (NS_SUCCEEDED(rv)) {                for (PRInt32 i = PRInt32(count) - 1; i >= 0; --i) {                    nsIRDFObserver* obs = (nsIRDFObserver*) mObservers->ElementAt(i);                    obs->OnUnassert(as->mSource, as->mProperty, as->mTarget);                    // XXX ignore return value?                }            }        }        Assertion* doomed = as;        as = as->mNext;        delete doomed;    }    return NS_OK;}