[vlc-devel] [PATCH 2/2] direct3d9: really release IDirect3DDevice9
ssbssa at yahoo.de
Mon Jul 6 19:53:25 CEST 2015
Jean-Baptiste Kempf <jb at videolan.org> schrieb am 19:31 Montag, 6.Juli 2015:
> Le 29/06/2015 21:11, Hannes Domani a écrit :
> > https://msdn.microsoft.com/en-us/library/windows/desktop/bb205880%28v=vs.85%29.aspx states that IDirect3DSurface9_GetDevice() increases the reference count on > the IDirect3DDevice9 interface.
> This does not seem right.
> > But I'm wondering if this part is actually necessary:
> > /* each picture_t holds a ref to the device and release it on Destroy */
> > IDirect3DDevice9_AddRef(vd->sys->d3ddev);
> And this is done in a loop, no?
> So why the release is not in a loop?
Yes, AddRef() is done in the loop for every picture.
And Release() is in DestroyPicture().
More information about the vlc-devel