[dx9-2] Make d3d8 know about the wined3d device
Alexandre Julliard
julliard at winehq.org
Thu Sep 23 18:27:32 CDT 2004
"Ann and Jason Edmeades" <us at the-edmeades.demon.co.uk> writes:
> +/* No reference counting is required as there will be only one reference from
> + Direct3DCreateX, and released when the reference count of that object gets to 0 */
> ULONG WINAPI IWineD3DImpl_AddRef(IWineD3D *iface) {
> + IWineD3DImpl *This = (IWineD3DImpl *)iface;
> + FIXME("(%p) : AddRef should never be called\n", This);
> return 1;
> }
>
> ULONG WINAPI IWineD3DImpl_Release(IWineD3D *iface) {
> + IWineD3DImpl *This = (IWineD3DImpl *)iface;
> + TRACE("(%p) : Releasing\n", This);
> + HeapFree(GetProcessHeap(), 0, This);
> return 0;
> }
If you are going to free the object on Release() then you should
really do proper ref counting. It costs basically nothing and it will
avoid a lot of headaches. Dummy refcounting is OK only if the count
really doesn't matter, i.e. the object never gets released.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list