From ab4743da9004675d6b1d4e94e465d1bf973ff37c Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Wed, 4 Jun 2025 11:14:02 +0800 Subject: [PATCH] pass keepData flag to instances of FFIAsset when creating geometry --- .../filament/src/implementation/ffi_filament_app.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 fba01af8..c4a636e5 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 @@ -1071,17 +1071,18 @@ class FFIFilamentApp extends FilamentApp { if (FILAMENT_WASM) { //stackRestore(stackPtr); - ptrList?.free(); + ptrList.free(); geometry.vertices.free(); - geometry.normals?.free(); - geometry.uvs?.free(); + geometry.normals.free(); + geometry.uvs.free(); } if (assetPtr == nullptr) { throw Exception("Failed to create geometry"); } - return FFIAsset(assetPtr, this, animationManager.cast()); + return FFIAsset(assetPtr, this, animationManager.cast(), + keepData: keepData); } ///