u0u0 / Quick-Cocos2dx-Community

Cocos2d-Lua 社区版
http://www.cocos2d-lua.org
552 stars 256 forks source link

spine 缓存不兼容 #133

Open zdx789 opened 5 years ago

zdx789 commented 5 years ago

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

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

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

zdx789 commented 5 years ago

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

计数器正常

u0u0 commented 5 years ago

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

zdx789 commented 5 years ago

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