On Tuesday 31 May 2011 13:55:21 Andrew Nguyen wrote:
The Pathologic demo in bug 21552 expects that the
reference count of a
IDirect3D9 instance is incremented after a successful call to
CreateDevice with the instance.
Does my proposed fix for d3d8 and d3d9 manage the reference count of the
device parent appropriately? In particular, I'm concerned about the
slightly cumbersome acquisition of the pointer to the parent instance
within the Release call for the Direct3D device interface.
I think it is correct.
But you can also just store a pointer to the
IDirect3D8/9 interface in the d3d8/9 device implementation like the resources
do. That way you can avoid the tricky object querying in the release function.