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

Commit

Permalink
Leak Device
Browse files Browse the repository at this point in the history
remove addreference on the Device because Context does not release them
  • Loading branch information
antonlobanov committed May 2, 2016
1 parent 8a2aab2 commit d0cba37
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Source/SharpDX.Direct3D11/Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ private static void CreateWithSwapChain(Adapter adapter, DriverType driverType,

if (context != null)
{
// Add a reference when setting the device on the context
((IUnknown)device).AddReference();
context.Device__ = device;
}

Expand Down Expand Up @@ -692,4 +690,4 @@ public static Device CreateFromDirect3D12(ComObject d3D12Device, Direct3D11.Devi
return devOut;
}
}
}
}

0 comments on commit d0cba37

Please sign in to comment.