To my understanding - it cannot be assumed that calling into the Disposer means that the corresponding COM-object gets destroyed (which means - COM-reference-count reaches zero). So, why should a call to Dispose cause a Flush (which needs to be synchronized with other operations on the immediate-context).
So... I'd suggest to remove those calls to ClearState/Flush - or am I missing something?
I ran across an issue caused by the call to ClearState/Flush in the Dispose-method of SharpDX.Direct3D11.DeviceContext.Dispose.
https://github.com/sharpdx/SharpDX/blob/master/Source/SharpDX.Direct3D11/DeviceContext.cs line 614-619.
To my understanding - it cannot be assumed that calling into the Disposer means that the corresponding COM-object gets destroyed (which means - COM-reference-count reaches zero). So, why should a call to Dispose cause a Flush (which needs to be synchronized with other operations on the immediate-context).
So... I'd suggest to remove those calls to ClearState/Flush - or am I missing something?