From: Luca Barbieri Date: Mon, 27 Sep 2010 20:52:34 +0000 (+0200) Subject: d3d11: fix reference counting so devices get freed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=912682659414f45dc0afca1950db3be1738c0dad;p=mesa.git d3d11: fix reference counting so devices get freed --- diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h index 9852dafa353..95ea4e00fc1 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h @@ -145,6 +145,8 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #if API >= 11 immediate_context = GalliumD3D11ImmediateDeviceContext_Create(this, immediate_pipe, owns_immediate_pipe); + // release to the reference to ourselves that the immediate context took, to avoid a garbage cycle + immediate_context->Release(); #endif }