[LayaAir 2.0]MovieClip卸载不掉,有内存泄漏
destroyItemsMovie() {
let n: number = 25;
while (--n > 0) {
let mov0 = this["item" + n] as MovieClip;
if (mov0) {
mov0.visible && (mov0.visible = false);
mov0.playing && mov0.stop();
mov0.parent && mov0.parent.removeChild(mov0);
mov0.destroy(true);
delete this["item" + n];
}
}
}
let n: number = 25;
while (--n > 0) {
let mov0 = this["item" + n] as MovieClip;
if (mov0) {
mov0.visible && (mov0.visible = false);
mov0.playing && mov0.stop();
mov0.parent && mov0.parent.removeChild(mov0);
mov0.destroy(true);
delete this["item" + n];
}
}
}
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Aar0n
赞同来自: