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
网友评论