删除Spine UI对象时,释放模型资源
parent
73f79d1193
commit
7dd6f75e24
|
@ -294,6 +294,22 @@ namespace Spine.Unity {
|
||||||
|
|
||||||
//this.UpdateMaterial(); // TODO: This allocates memory.
|
//this.UpdateMaterial(); // TODO: This allocates memory.
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
|
protected override void OnDestroy()
|
||||||
|
{
|
||||||
|
if( meshBuffers != null)
|
||||||
|
{
|
||||||
|
var c = meshBuffers.GetCurrent();
|
||||||
|
if( c != null)
|
||||||
|
c.Dispose();
|
||||||
|
var n = meshBuffers.GetNext();
|
||||||
|
if( n != null)
|
||||||
|
{
|
||||||
|
n.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue