Hi Michael, > I don't really know what you want to cleanup here, looks very clean to me.
The cleanup I'm currently working on is changing This->ref[++|--] and friends into Interlocked * functions for thread safety (see Janitorial page on WineHQ). > > You are right, the release method is buggy. the comparision must check > against one instead of zero or the decrement in the return statement > must be moved before this if-statement. > > Michael Günnewig > I will create a patch for it and send it to wine-devel first, so at least you could have a look after that. There is another place where I found the same construct (ICMStream_fnRelease in icmstream.c). After the above is fixed, I will continue my AddRef/Release code cleanup on this dll. One question remains though, what do I do with: /* also release reference to the nested stream */ if (This->pStream != NULL) IAVIStream_Release(This->pStream); should this be done regardless of the value of This->ref ? Cheers, Paul.