Sylidar написавWe change the spine skeleton during runtime with Initialize(). However, every time we call it, it causes a memory leak for about 100kb.
Just to be on the same page: I assume you are assigning a different SkeletonDataAsset
and then calling Initialize()
, right?
Does this also happen in a minimal setup when you only switch between different skeletons and not perform any other game logic, repacking attachments, switching materials, etc?
Did you test that this increase does not happen when you omit changing skeletons (removing the spine API calls and leaving the skeleton untouched, just to make sure)?
Does the memory increase also happen when you perform the switch to the same skeleton (and not to a different SkeletonDataAsset
)?
Where exactly did you see the 100kb increase in memory usage? I assume you saw that in the Unity profiler window - if so, which line of the graph showed the 100kb spike or where did you see the 100kb value?