зеркало из https://github.com/mozilla/pjs.git
Bug 5637. Don't release each observer in the destructor, because we only hold a weak ref to it. r=putterman,a=chofmann.
This commit is contained in:
Родитель
aa24a3d644
Коммит
e325b77546
|
@ -93,13 +93,9 @@ nsMessageViewDataSource::~nsMessageViewDataSource (void)
|
|||
RemoveDataSource(mDataSource);
|
||||
if(mURI)
|
||||
PL_strfree(mURI);
|
||||
if (mObservers) {
|
||||
for (PRInt32 i = mObservers->Count() - 1; i >= 0; --i) {
|
||||
nsIRDFObserver* obs = (nsIRDFObserver*) mObservers->ElementAt(i);
|
||||
NS_RELEASE(obs);
|
||||
}
|
||||
delete mObservers;
|
||||
}
|
||||
|
||||
delete mObservers; // we only hold a weak ref to each observer
|
||||
|
||||
nsrefcnt refcnt;
|
||||
NS_RELEASE2(kNC_MessageChild, refcnt);
|
||||
NS_RELEASE2(kNC_Subject, refcnt);
|
||||
|
|
|
@ -76,13 +76,9 @@ nsMsgFolderDataSource::~nsMsgFolderDataSource (void)
|
|||
mRDFService->UnregisterDataSource(this);
|
||||
|
||||
PL_strfree(mURI);
|
||||
if (mObservers) {
|
||||
for (PRInt32 i = mObservers->Count() - 1; i >= 0; --i) {
|
||||
nsIRDFObserver* obs = (nsIRDFObserver*) mObservers->ElementAt(i);
|
||||
NS_RELEASE(obs);
|
||||
}
|
||||
delete mObservers;
|
||||
}
|
||||
|
||||
delete mObservers; // we only hold a weak ref to each observer
|
||||
|
||||
nsrefcnt refcnt;
|
||||
NS_RELEASE2(kNC_Child, refcnt);
|
||||
NS_RELEASE2(kNC_MessageChild, refcnt);
|
||||
|
|
|
@ -72,13 +72,9 @@ nsMsgMessageDataSource::~nsMsgMessageDataSource (void)
|
|||
mRDFService->UnregisterDataSource(this);
|
||||
|
||||
PL_strfree(mURI);
|
||||
if (mObservers) {
|
||||
for (PRInt32 i = mObservers->Count() - 1; i >= 0; --i) {
|
||||
nsIRDFObserver* obs = (nsIRDFObserver*) mObservers->ElementAt(i);
|
||||
NS_RELEASE(obs);
|
||||
}
|
||||
delete mObservers;
|
||||
}
|
||||
|
||||
delete mObservers; // we only hold a weak ref to each observer
|
||||
|
||||
nsrefcnt refcnt;
|
||||
|
||||
NS_RELEASE2(kNC_Subject, refcnt);
|
||||
|
|
Загрузка…
Ссылка в новой задаче