From 7ed120e854afbb45968cc2bccd2bde3e13d53fde Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Tue, 1 Jul 2025 10:25:36 +0800 Subject: [PATCH] call removeSwapChain when swapChain is destroyed --- .../lib/src/filament/src/implementation/ffi_filament_app.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/thermion_dart/lib/src/filament/src/implementation/ffi_filament_app.dart b/thermion_dart/lib/src/filament/src/implementation/ffi_filament_app.dart index 3aa88700..ef15f833 100644 --- a/thermion_dart/lib/src/filament/src/implementation/ffi_filament_app.dart +++ b/thermion_dart/lib/src/filament/src/implementation/ffi_filament_app.dart @@ -221,6 +221,7 @@ class FFIFilamentApp extends FilamentApp { /// 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);