作词人

我的cocos2dx工程是使用lua脚本来实现的,当我重启luaEngine后(并将所有引用spine和缓存spine全部释放后),skeletonBatch内的_vertices依然有之前的顶点数据,并且再次加载游戏内的spine并重启后,_vertices的存储量甚至到达1000万。。。。所以,我是否该在重启前手动析构掉skeletonBatch呢?



My cocos2dx project is implemented using Lua script. After I restart luaengine (and release all referenced spines and cached spines), the_ Vertices still has the previous vertex data, and after loading the in-game spine again and restarting_ The storage capacity of vertices even reaches 10 million.... So should I manually destruct skeletonbatch before restarting?
作词人
  • Postovi: 1

Mario

正确的! 请在重新加载时调用 SkeletonBatch::destroyInstance()。

Correct! Please call SkeletonBatch::destroyInstance() when reloading.
Avatar
Mario

Mario
  • Postovi: 2968


Natrag na 中国Spine用户