-
Notifications
You must be signed in to change notification settings - Fork 305
Open
Description
うちで作っているゲームはなぜメモリリークが発生しているのか調査したら、
今のreplaceScene 関数だと、replaceScene する度にメモリが増えてしまう。
新しいシーンをpushする前に、現在のシーンのすべてのchildNodeを取り去らなければならいようです。
replaceScene: function(scene) {
var currentScene = this.popScene();
while (currentScene.childNodes.length > 0) {
currentScene.removeChild(currentScene.childNodes[0]);
}
return this.pushScene(scene);
},
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels