On 11 May 2016 at 16:43, Aaryaman Vasishta <jem456.vasishta@gmail.com> wrote:
> @@ -46,10 +46,27 @@ static inline struct d3drm_texture *impl_from_IDirect3DRMTexture3(IDirect3DRMTex
>
> void d3drm_texture_destroy(struct d3drm_texture *texture)
> {
> + if (texture->image)
> + IDirect3DRM_Release(texture->d3drm);
> d3drm_object_cleanup((IDirect3DRMObject*)&texture->IDirect3DRMTexture3_iface, &texture->obj);
It's somewhat hypothetical, but it seems safer to release the
IDirect3DRM interface after the d3drm_object_cleanup() call, in case
there are callbacks that (implicitly) depend on the Direct3DRM object
still existing. (E.g., is it possible to call
IDirect3DRMObject2::GetDirect3DRM() on textures?)