icmstream mem leak fix

Mike McCormack mike at codeweavers.com
Tue Nov 30 02:12:23 CST 2004


James Hawkins wrote:

> I just want to make sure I've got this.  Do we want to release even if
> the call to QueryInterface suceeds?

The old code sets ref=0, then just free's the memory.  My method would 
set ref=1, then call Release() which decrements ref and free's memory.

If QueryInterface succeeds, then it will increment the reference count 
again, so we'll only end up free'ing memory in Release if the 
QueryInterface fails.  It's a more COM-ish way of doing things... the 
original code still works though.

Mike



More information about the wine-devel mailing list