My spine runtime is v2.5.
I remember that your previous runtime has some cleaning up code for temporary mesh in onDestroy as below.
public virtual void OnDestroy ()
{
if (mesh1 != null) {
if (Application.isPlaying)
Destroy(mesh1);
else
DestroyImmediate(mesh1);
}
if (mesh2 != null) {
if (Application.isPlaying)
Destroy(mesh2);
else
DestroyImmediate(mesh2);
}
mesh1 = null;
mesh2 = null;
}
But, when it comes to the recent version, I cannot find any cleaning up codes calling Destroy/DestroyImmediate for temporary mesh. You adopted new mesh managing system like 'DoubleBuffered<SmartMesh>' in the recent version, and it seems that doing this work, you missed destroying the actual mesh objects.
As far as I know, Unity doesn't automatically destroy temporary mesh/material objects, and we have to do these annoying job. Or am I wrong? Was Unity changed in new version?
Please let me know.