On Tue, Jun 28, 2016 at 3:24 AM, Aaryaman Vasishta < jem456.vasishta@gmail.com> wrote:
- if (viewport->d3d_viewport)
return D3DRMERR_BADOBJECT;
- IDirect3DRM_AddRef(viewport->d3drm);
FWIW, I didn't put the intentional d3drm, camera leaks here because it seems that the device controls the leaked references via some sort of destroy callback on the device. (See the todo_wine tests in this patch).
- todo_wine ok(ref4 > frame_ref2, "Expected ref4 > frame_ref2, got
frame_ref2 = %u, ref4 = %u.\n", frame_ref2, ref4);
- IDirect3DRMDevice3_Release(device3);
- IDirect3DRMDevice_Release(device1);
I tried to release d3drm explicitly myself, like how I did with the texture tests. But the tests would then crash here, at IDirect3DRMDevice_Release, where the device gets destroyed. Which probably indicates that the device stores a list of leaked references and releases them on getting destroyed. For now I've decided to avoid the leak, thus avoiding the use of a destroy callback, and implementing this as a separate later on if an application demands it, unless it's safer to get this done on priority.
Cheers, Aaryaman