Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit d0cba37

Browse files
committed
Leak Device
remove addreference on the Device because Context does not release them
1 parent 8a2aab2 commit d0cba37

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Source/SharpDX.Direct3D11/Device.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ private static void CreateWithSwapChain(Adapter adapter, DriverType driverType,
195195

196196
if (context != null)
197197
{
198-
// Add a reference when setting the device on the context
199-
((IUnknown)device).AddReference();
200198
context.Device__ = device;
201199
}
202200

@@ -692,4 +690,4 @@ public static Device CreateFromDirect3D12(ComObject d3D12Device, Direct3D11.Devi
692690
return devOut;
693691
}
694692
}
695-
}
693+
}

0 commit comments

Comments
 (0)