SkeletonRenderer(&SkeletonAnimation)
At Call Initialize(true) For Change Skln
In Initialize
doubleBufferedMesh = new DoubleBuffered<SmartMesh>();
▲▲▲▲▲▲
I Think
this code make Two Mesh
(Each New SmartMesh make New Mesh)
The Important point is
used Meshes(prev)(in 2 SmartMeshes of doubleBufferedMesh ) don't disappear.
so
with the passage of time
when I need
Call Initialize(true) (for need), Call, Call, Call.....
count of Mesh(+ using Memory) is up rising
and
Finally, Crash!
I'm using Runtime 2.3
This problem have solved at Recent Version?
I Find it T.T
Basically, This is not Spine Problem(but little)
++++ This Ploblem is With NGUI
Another Asset Referenced usedMeshes, so Every usedMehes(although new Mesh soon) are refrenced
GC Igonre them....
So I Edit to Recycle doubleBufferedMesh;
if(doubleBufferedMesh == null)
doubleBufferedMesh = new DoubleBuffered<SmartMesh>();
SmartMesh sm1 = doubleBufferedMesh.GetNext();
sm1.mesh.Clear();
sm1.instructionUsed.Clear();
SmartMesh sm2 = doubleBufferedMesh.GetNext();
sm2.mesh.Clear();
sm2.instructionUsed.Clear();
I will check this solution have ploblem.
This is Not Solution.....
SmartMesh.mesh.Clear();
any SpineAnimation Flash.....like is, isnt, is, isnt, is, isnt....
Solve Flash
SmartMesh.mesh.Clear();
(Add)SmartMesh.instructionUsed.Clear();