Browse Source

flutter: fix memory cleanup is slow due to not destroying shaders (#2470)

Hán Trung Kiên 1 năm trước cách đây
mục cha
commit
8e200efdbb

+ 5 - 0
spine-flutter/lib/spine_flutter.dart

@@ -183,6 +183,11 @@ class Atlas {
     for (final image in atlasPages) {
     for (final image in atlasPages) {
       image.dispose();
       image.dispose();
     }
     }
+    for (final map in atlasPagePaints) {
+      map.values.forEach((element) {
+        element.shader?.dispose();
+      });
+    }
   }
   }
 }
 }