Quick-Cocos2dx-Community icon indicating copy to clipboard operation
Quick-Cocos2dx-Community copied to clipboard

spine 缓存不兼容

Open zdx789 opened this issue 5 years ago • 3 comments

当我使用spine lua缓存的时候 texture 计数+1 create spine animation 释放spine lua缓存 spine animation update 崩溃

原因在于,缓存spine 后,texture 计数 一直是2 当我释放lua spine 缓存后,计数器变成1

自动内存回收,导致 texture 被释放。

zdx789 avatar Sep 16 '19 13:09 zdx789

我的解决方案,暂时为: 在lua createwithdata时, texture +1 释放spine animation后,texture -1

计数器正常

zdx789 avatar Sep 16 '19 13:09 zdx789

测试代码? 加群描述下问题哈,解决起来快。

u0u0 avatar Sep 16 '19 14:09 u0u0

TIM截图20190917101154 这是我的补丁版解决方案。

zdx789 avatar Sep 17 '19 02:09 zdx789