Environment
- Android: 16
- Windows: 10 x64
- Flutter: 3.44.6
- spine_flutter: 4.2.36
Steps to reproduce
- Create a page containing a
SpineWidget.
- Open the page and initialize the Spine animation.
- Leave the page and dispose the widget.
- Repeat this process many times.
Expected behavior
After disposing the SpineWidget, native memory usage should return close to the original level.
Actual behavior
Native memory usage keeps increasing after repeatedly creating and disposing SpineWidget.
On Android, after around 300-400 open/close cycles:
Native Heap: Pss: ~881 MB Rss: ~884 MB
Meanwhile:
Dalvik Heap: Alloc: ~2.9 MB
Graphics memory also remains relatively stable:
Graphics: ~64 MB
This suggests that the memory increase is not caused by Dart/Java heap growth, but likely by native resources.
The same behavior can also be observed on Windows: repeatedly creating and destroying SpineWidget instances causes process memory usage to continuously increase.
On Windows, the working set can be reduced by memory trimming, but Android native heap allocation remains high.
This issue does not occur when using normal Flutter widgets without SpineWidget.
Additional notes
Could you please check whether native resources inside the Spine Flutter runtime are properly released when SpineWidget is disposed?
Thanks.
Environment
Steps to reproduce
SpineWidget.Expected behavior
After disposing the
SpineWidget, native memory usage should return close to the original level.Actual behavior
Native memory usage keeps increasing after repeatedly creating and disposing
SpineWidget.On Android, after around 300-400 open/close cycles:
Native Heap: Pss: ~881 MB Rss: ~884 MB
Meanwhile:
Dalvik Heap: Alloc: ~2.9 MB
Graphics memory also remains relatively stable:
Graphics: ~64 MB
This suggests that the memory increase is not caused by Dart/Java heap growth, but likely by native resources.
The same behavior can also be observed on Windows: repeatedly creating and destroying
SpineWidgetinstances causes process memory usage to continuously increase.On Windows, the working set can be reduced by memory trimming, but Android native heap allocation remains high.
This issue does not occur when using normal Flutter widgets without
SpineWidget.Additional notes
Could you please check whether native resources inside the Spine Flutter runtime are properly released when
SpineWidgetis disposed?Thanks.