call method channel destroyContext on Windows

This commit is contained in:
Nick Fisher committed 2025-04-02 22:28:47 +08:00
1 parent 854b142973
commit cf372f4dc2
1 file changed
+2
@@ -98,7 +98,9 @@ class ThermionFlutterMethodChannelPlatform extends ThermionFlutterPlatform {
if (FilamentApp.instance == null) {
await FFIFilamentApp.create(config: config);
FilamentApp.instance!.onDestroy(() async {
if(Platform.isWindows) {
await channel.invokeMethod("destroyContext");
}
_swapChain = null;
});
}