[QUARTZ] Use Interlocked* functions in AddRef and Release (RESEND)
Alexandre Julliard
julliard at winehq.org
Tue Jan 4 14:48:27 CST 2005
Paul Vriens <Paul.Vriens at xs4all.nl> writes:
> TRACE("(%p)->()\n", iface);
> - if (!--This->refCount)
> + if (!InterlockedDecrement(&This->refCount))
> {
> CoTaskMemFree(This->ppFilters);
> CoTaskMemFree(This);
You also need to store the result of the decrement and have the
function return that value instead of This->refCount, otherwise it's
still not thread-safe.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list