DDraw->WineD3D refcounting hack

Stefan Dösinger stefandoesinger at gmx.at
Fri Mar 10 05:49:34 CST 2006

> You could have a function to explicitly destroy the object, regardless
> of reference count. However, I think that one already got mentioned
> last time :-)
Yes, that was mentioned, and indeed I have one internal function, mainly for 
code readability. The problem is that I can't destroy the sublevel surfaces 
when the root surface is destroyed, I have to wait until the WineD3DTexture 
is destroyed. In most cases, this is equal, and the root surface holds the 
only reference to the WineD3DTexture, but in some cases WineD3D holds an 
internal reference. If I just destroy the sublevels with the root, then 
WineD3D will get angry(aka crash) because I take away the Textures surfaces. 
The first wineD3D surface survives because it's parent is an IParent object, 
and destroying the root surface does only Release the WineD3DTexture, not the 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060310/87b4fb5a/attachment-0001.pgp

More information about the wine-devel mailing list