Use Interlocked* functions
jorishuizer at planet.nl
Mon Jan 10 13:15:05 CST 2005
Mike Hearn wrote:
> On Mon, 10 Jan 2005 18:03:30 +0100, Joris Huizer wrote:
>>Paul Vriens was posting patches in which references to This->ref in
>>TRACE calls were replaced by a variable containing the value of
>>This->ref - I can't remember why this was necessary, but I don't think
>>he's doing it just for the fun of it
> Right, in the case where you do this:
> DWORD refs = InterlockedDecrement(&This->refs);
> TRACE("refcount is now %d\n", This->refs);
> that's clearly wrong, it should be refs in the second line.
> But refcounts are dumped all over the place, I have a feeling that grep
> will give a *lot* of false positives ....
Yeah, I'm sure you are right; I'm sorry, I didn't really think hard I
but later on I noticed myself it's in other places as well;
I now guess/think looking at
grep -r -n "_AddRef(LPCLASSFACTORY" *
is the way to go - which gave me 71 hits, of which a number is already
done; Would this just hit on (all?) the correct functions ?
sorry for the confusion
More information about the wine-devel