Jacek Caban (@jacek) commented about dlls/mshtml/xmlhttprequest.c:
static ULONG WINAPI HTMLXMLHttpRequest_Release(IHTMLXMLHttpRequest *iface) { HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface);
- LONG ref = InterlockedDecrement(&This->ref);
LONG ref = dispex_ref_decr(&This->event_target.dispex);
TRACE("(%p) ref=%ld\n", This, ref);
/* The Cycle Collector might delay the unlink or destruction after ref reaches 0,
but we don't want a task to possibly grab ref to us and send events anymore. */
If we reach 0 ref count, it means that we're already unlinked, so where do those events come from?