Re: d3drm/tests: Release two retrieved interfaces to allow proper cleanup.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Am 2015-10-15 um 21:54 schrieb Bernhard Übelacker:
+ hr = IDirect3DRMFrame_DeleteChild(pFrameP2, pFrameC); + ok(hr == D3DRM_OK, "Cannot remove child frame (hr = %x)\n", hr); + CHECK_REFCOUNT(pFrameC, 1); + + CHECK_REFCOUNT(pFrameP1, 2); + hr = IDirect3DRMFrame_DeleteChild(pFrameP2, pFrameP1); + ok(hr == D3DRM_OK, "Cannot remove child frame (hr = %x)\n", hr); + CHECK_REFCOUNT(pFrameP1, 1); Are these necessary? I'd expect the frame children to be detached when their parent is destroyed, similarly to how it works in ddraw.
I'm not opposed to explicitly removing them, so I'll send my signed-off-by to wine-patches. But it's something someone (Jamm? ;-) ) could write an explicit test for. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWINjmAAoJEN0/YqbEcdMwQFAQAIcW8C+DxXKqNfUX2gxN3HtP FHrr2i+Ufy694aoL/O+hcWgL0mxS/Hv9F9RnXth+m5x1FKBkKJx1DA3wXZl+N6Ea w961wIDiPZCzCr2Hb1HGeQEEKBoPXnY3oxtGmOipv8bYEpjSXLngYKXVmM9U0Ojl BjAKCPraAukui5sLaMr3Bypf6jrOylrceWnyXo70Q7E1Gg5Lq5auTawYDvDsYxKF WISMIn5eBXsNDr4irRneuW/2JDwbB/FePzkqxhVfKzkw9K0A72enuzHMWkfeXAHS zQvZr+uSC+KanwWJq41VdFhWzFNhudUklHT/Ne5vl/nPeFibtCmB6CxoGtVJPaqT Htzb2MoPV4cV/efp+2+oZPPZxOeAgXhdFmWqGUYZ02/rHpthH8saRJ1mGZoWY7DU R82s3k0vXBmwzhK1CHvs2zZgi6mt25qZqeJwM7Ehci/VLwjaREjts8yetGL8NoKP 9ZFx+Hg4LD4w8mBOc5utkerODw6fwIZ3KKCfdX2S9FAIbqWsZ0/cN4rmJkIjRMGq FiYyOZ9GU2H93CyRTtQfv3mVcXGh2LXxvxsgviR5gzBxo4XbVqiYe/cFcCfTtJQu NrTYURDXQxFFkjq5rZXYP4bUItGAbuoC5/Kh4C/ATONahQq9yqEo7qDQRsP9IRS6 AX+rnn4Sagutm0q/OJc8 =R0Nv -----END PGP SIGNATURE-----
Am 16.10.2015 um 13:00 schrieb Stefan Dösinger:
Are these necessary? I'd expect the frame children to be detached when their parent is destroyed, similarly to how it works in ddraw.
Thanks for your time. You are right. To get these released the explicit DeleteChild is not neccessary. (I first added these but later failed to realize that I do not need them anymore.) Should I send a changed patch for it? Kind regards, Bernhard
On Fri, Oct 16, 2015 at 4:30 PM, Stefan Dösinger <stefandoesinger(a)gmail.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Am 2015-10-15 um 21:54 schrieb Bernhard Übelacker:
+ hr = IDirect3DRMFrame_DeleteChild(pFrameP2, pFrameC); + ok(hr == D3DRM_OK, "Cannot remove child frame (hr = %x)\n", hr); + CHECK_REFCOUNT(pFrameC, 1); + + CHECK_REFCOUNT(pFrameP1, 2); + hr = IDirect3DRMFrame_DeleteChild(pFrameP2, pFrameP1); + ok(hr == D3DRM_OK, "Cannot remove child frame (hr = %x)\n", hr); + CHECK_REFCOUNT(pFrameP1, 1); Are these necessary? I'd expect the frame children to be detached when their parent is destroyed, similarly to how it works in ddraw.
I'm not opposed to explicitly removing them, so I'll send my signed-off-by to wine-patches. But it's something someone (Jamm? ;-) ) could write an explicit test for.
Well I agree that it's not really needed since the Release method already deletes any existing children that exist on the frame that it's called on.
Then again, I didn't check the refcounting behavior of frames with children. Maybe these tests could probably be merged with the refcount tests in test_frame_qi? Cheers, Aaryaman On Sat, Oct 17, 2015 at 12:03 AM, Aaryaman Vasishta < jem456.vasishta(a)gmail.com> wrote:
On Fri, Oct 16, 2015 at 4:30 PM, Stefan Dösinger < stefandoesinger(a)gmail.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Am 2015-10-15 um 21:54 schrieb Bernhard Übelacker:
+ hr = IDirect3DRMFrame_DeleteChild(pFrameP2, pFrameC); + ok(hr == D3DRM_OK, "Cannot remove child frame (hr = %x)\n", hr); + CHECK_REFCOUNT(pFrameC, 1); + + CHECK_REFCOUNT(pFrameP1, 2); + hr = IDirect3DRMFrame_DeleteChild(pFrameP2, pFrameP1); + ok(hr == D3DRM_OK, "Cannot remove child frame (hr = %x)\n", hr); + CHECK_REFCOUNT(pFrameP1, 1); Are these necessary? I'd expect the frame children to be detached when their parent is destroyed, similarly to how it works in ddraw.
I'm not opposed to explicitly removing them, so I'll send my signed-off-by to wine-patches. But it's something someone (Jamm? ;-) ) could write an explicit test for.
Well I agree that it's not really needed since the Release method already deletes any existing children that exist on the frame that it's called on.
participants (3)
-
Aaryaman Vasishta -
Bernhard Übelacker -
Stefan Dösinger