1、关于videoTexture销毁释放内存泄漏的问题,这个我们处理下,开发者可以临时改下引擎临时处理下,增加一个消耗video节点的方法:
destroyVideoElement() {
if (this.element) {
this.element.pause();
this.element.src = "";
while (this.element.childElementCount)
this.element.firstChild.remove();
}
ILaya.timer.clear(this, this.render);
}
2、关于Image所说的内存泄漏的问题,你们上面的描述更多的可以认为这个属于项目本身的处理问题。针对一个Image实例对象,频繁的切换skin,看更换当前的图片显示内容。这个最好的实现方式就是在切换前用一个数组存下当前的Image实例的skin地址,在完全不用了,遍历全部销毁释放下就行了。这个如果放到引擎里处理,并不是一个好的建议。