cocos2d

cocos2d-lua 查看内存 纹理缓存状态

2018-01-16  本文已影响13人  人气小哥

local textureMemory = math.floor(cc.Director:getInstance():getTextureCache():getTextureMemory()/1024)
local str = string.format("现在内存是: %sM", textureMemory)
print(str)

g_writeErrorLog(cc.Director:getInstance():getTextureCache():getCachedTextureInfo(), "纹理占用", true)

--因为打印太多 所以用写日志的方式
g_writeErrorLog参考文章
https://www.jianshu.com/p/5bf0702e745e

上一篇下一篇

猜你喜欢

热点阅读