Stop the render loop before requesting disposal

このコミットが含まれているのは:
Sergio Pedri committed 2022-08-03 15:46:23 -07:00
1 親 c577733ac7
コミット 7dca92dc33
1ファイル変更
+6
+6
ファイルの表示
@@ -90,6 +90,12 @@ public sealed partial class AnimatedComputeShaderPanel : SwapChainPanel, IDispos
/// <inheritdoc/>
public void Dispose()
{
// Also request the render loop to stop before disposing. This ensures that in case there's
// a render thread already ongoing that is using a custom frame request queue, it might have
// the ability to stop rendering immediately and safely, instead of causing the panel to remain
// alive and then just throwing an exception the next time a frame is requested in case the
// device ot other resources have also been disposed.
this.swapChainManager.StopRenderLoop();
this.swapChainManager.Dispose();
}
}