call removeSwapChain when swapChain is destroyed

This commit is contained in:
Nick Fisher
2025-07-01 10:25:36 +08:00
parent 45c4cea6aa
commit 7ed120e854

View File

@@ -221,6 +221,7 @@ class FFIFilamentApp extends FilamentApp<Pointer> {
///
Future destroySwapChain(SwapChain swapChain) async {
_logger.info("Destroying swapchain");
RenderTicker_removeSwapChain(renderTicker, swapChain.getNativeHandle());
await withVoidCallback((requestId, callback) {
Engine_destroySwapChainRenderThread(
engine, swapChain.getNativeHandle(), requestId, callback);