1、lua
collectgarbage("setpause", 100)
2、cocos图片缓存
local textureCache = director:getTextureCache()
local spriteFrameCache = cc.SpriteFrameCache:getInstance()
textureCache:removeUnusedTextures()
spriteFrameCache:removeUnusedSpriteFrames()
collectgarbage("setpause", 100)
local textureCache = director:getTextureCache()
local spriteFrameCache = cc.SpriteFrameCache:getInstance()
textureCache:removeUnusedTextures()
spriteFrameCache:removeUnusedSpriteFrames()
本文标题:cocos2dx内存篇
本文链接:https://www.haomeiwen.com/subject/jxjziktx.html
网友评论