diff --git a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs index 1c41b5e7..77e454a0 100644 --- a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs +++ b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.IDXGIFactory6.cs @@ -162,6 +162,8 @@ internal static partial class DeviceHelper @this->lpVtbl = Vtbl; @this->dxgiFactory4 = dxgiFactory4; + _ = dxgiFactory4->AddRef(); + *dxgiFactory6 = (IDXGIFactory6*)@this; }