I had a question about nsURI_Release. Is it okay for this function to release multiple references at once or is it supposed to release references one at a time?
I'm trying to narrow down an application lock-up, and it appears that it occurs when mshtml release multiple references at the same time (say for example, the last AddRef shows 10, and the next release shows 9, then a subsequent release shows 0).
After this the last thing reported (or at least that I was tracing) was shdocvw, and it showed:
trace:shdocvw:DllMain 0x60fa0000 0x2 (nil) trace:shdocvw:DllMain 0x60fa0000 0x3 (nil)
The application just beeps when I try to give it any user interface input beyond this point, as if it is busy (which it isn't busy doing anything application oriented). I can still hit the "Close" on the application, but it fails to close. At any rate, that is the reason for the question.
Brandon Warhurst wrote:
I had a question about nsURI_Release. Is it okay for this function to release multiple references at once or is it supposed to release references one at a time?
Of course it's not. nsURI is an implementation of nsIURI interface that is the XPCOM interface and inherits from nsISupports which is very similar to MS COM IUnknown. So its Release method is very similar to IUnknown::Release.
I'm trying to narrow down an application lock-up, and it appears that it occurs when mshtml release multiple references at the same time (say for example, the last AddRef shows 10, and the next release shows 9, then a subsequent release shows 0).
Are you sure it's ref count of the same instance of the object?
After this the last thing reported (or at least that I was tracing) was shdocvw, and it showed:
trace:shdocvw:DllMain 0x60fa0000 0x2 (nil) trace:shdocvw:DllMain 0x60fa0000 0x3 (nil)
It doesn't mean it's connected with the bug you try to fix (well, I'm almost sure it's not).
Jacek