DeviceContext.Release sometimes crashes. #356
Answered
by
amerkoleci
Gavin-Williams
asked this question in
Q&A
-
I have this in my device dispose method.. DxDeviceContext.ClearState();
DxDeviceContext.Flush();
DxDeviceContext.Release();
DxDeviceContext.Dispose();
DxDeviceContext = null; But the call to release will crash if the app is allowed to run through without doing anything - in the case where I haven't created a window for instance.
If I comment out the call to release, the program closes down cleanly. Am I meant to be doing some check here for existing references before calling Release? |
Beta Was this translation helpful? Give feedback.
Answered by
amerkoleci
Sep 20, 2022
Replies: 1 comment
-
You don't have to call both Release and Dispose, as Dispose calls Release behind the scenes |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Gavin-Williams
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You don't have to call both Release and Dispose, as Dispose calls Release behind the scenes