DragonBone内存释放方面问题

一只驴子
Tue, 11 Jul 2017 10:52:28 +0000

//创建
cc.loader.loadRes(‘prefabs/sprite_xiannv’, function (err, prefab) {
if (err) {
cc.error(err.message || err);
return;
}
cc.log(prefab);
self.xiannvPr = cc.instantiate(prefab);
self.node.addChild(self.xiannvPr);
self.xiannvPr.setPosition(cc.p(0,400));
self.xiannvScript = self.xiannvPr.getComponent(‘sprite_xiannv’);
self.xiannvScript.posX = 0;
self.xiannvScript.posY = 400;
});

//释放
this.xiannvPr.destroy();
var deps = cc.loader.getDependsRecursively(‘prefabs/sprite_xiannv’);
cc.loader.release(deps);
cc.sys.garbageCollect();

场景来回切换 发现内存不停上涨 @jare @panda

阅读整个主题