[LayaAir 2.0]百度小游戏 内存不断增大的情况

	__proto.onConfigLoaded=function(){
Laya.init(600,400);
Laya.loader.load([{url:"res/atlas/comp.json",type:"atlas"}],Handler.create(this,this.onLoadUi));

}
__proto.onLoadUi=function(){
Laya.timer.loop(100,this,this.onLoaded);


}

__proto.onLoaded=function(){
if(this.isOpen){
return;
}
this.isOpen=true;
var testView=new TestView();
Laya.stage.addChild(testView);
Laya.timer.once(200,this,this.removeUi,[testView]);
}

__proto.removeUi=function(ui){
if(ui!=null){
ui.destroy();
this.isOpen=false;
}
}


TIM20190517155524.png

 代码主要是做了重复打开关闭一个界面,调用界面的destroy方法,运行一段时间发现内存在不断增大。请问这是BUG还是我的代码写的不对。
Laya引擎版本是 2.0.1beta
百度开发者工具版本是2.2.4 编译工具版本2.1.0 库版本是1.7.4
 
测试demo:
已邀请:

Aar0n

赞同来自:

引擎旧版本有内存泄露,建议升级至最新的引擎。新版是修复内存泄露的。

要回复问题请先

商务合作
商务合作