Esme Povirk (@madewokherd) commented about dlls/uiautomationcore/uia_event.c:
*obj = iface;
- else
return E_NOINTERFACE;
- return S_OK;
+}
+static ULONG WINAPI ProxyEventSink_AddRef(IProxyProviderWinEventSink *iface) +{
- return 2;
+}
+static ULONG WINAPI ProxyEventSink_Release(IProxyProviderWinEventSink *iface) +{
- return 1;
+}
I'm not sure that leaving out refcounting here is safe. It wouldn't make much sense, but I don't see any reason the IProxyProvider couldn't addref and save this object past the event lifetime.