WineD3D refcounting fun part II :)

H. Verbeet hverbeet at
Fri Feb 24 14:40:40 CST 2006

On 24/02/06, Stefan Dösinger <stefandoesinger at> wrote:
> Are you sure that the Direct3DDevice9 should be released? Windows addrefs the
> DirectDraw interface when a surface is created, I'd be surprised if Microsoft
> changed that behavior in d3d8 or d3d9. From your description I'd say that
> there are still Direct3D9 surfaces hanging, which shouldn't happen.
I assume Roderick is talking about the final Release on the d3d
device, ie, the one you got from CreateDevice. The surfaces are
holding a couple of references to the device, and those should get
released when the surface is destroyed, yes. But the application is
also holding a single reference to de device.

Looking at the trace from the multitexture demo, it appears
GetContainer sometimes adds an extra reference to the device. I've
submitted a patch for this to wine-patches.

More information about the wine-devel mailing list