Tweaked refcnt munging to better support refcnt tracking

git-svn-id: svn://10.0.0.236/trunk@49904 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1999-10-05 23:58:32 +00:00
parent 3a3369076f
commit 71408231d2

View File

@@ -264,10 +264,9 @@ void nsWidget::OnDestroy()
// dispatching of the event may cause the reference count to drop
// to 0 and result in this object being destroyed. To avoid that,
// add a reference and then release it after dispatching the event
nsrefcnt old = mRefCnt;
mRefCnt = 99;
mRefCnt += 100;
DispatchStandardEvent(NS_DESTROY);
mRefCnt = old;
mRefCnt -= 100;
}
}