Creator每设置一次Label的文本 内存增加一次 没有及时释放

  • Creator 版本:1.6.2

  • 目标平台: Android

cc.Class({
extends: cc.Component,

properties: {
    label: {
        default: null,
        type: cc.Label
    },
    // defaults, set visually when attaching this script to the Canvas
    text: 'Hello, World!'
},

// use this for initialization
onLoad: function () {
    this.type = 0;
    var n = 0; 
    this.timeCb = ()=>{
        if(this.type == 1){
            this.label.string = ++n;//时间
        }else{
            this.label.string = "";
        }
        this.t = setTimeout(this.timeCb, 1000);
    }
    this.timeCb();
},

btnClick:function(event, tag){
    cc.log("点击后每秒设置一次label.string");
    this.type = 1;       
},

// called every frame
update: function (dt) {

},

});

别沉啊

@panda

有人知道怎么解决吗?在线等,急

你试试不用Label换成BMFONT试试呢

主要是想知道为何内存会持续增长

为什么没人能支援一下?

1.6 已经不维护了喔,我们最近推出的 1.9.3 测试版应该修复了这个问题: http://forum.cocos.com/t/cocos-creator-v1-9-3-6-21-rc-3/61125

我想问一下,你这是用什么工具来查看内存的

安卓屎丢丢

AndroidStudio