Commit 9564086e authored by limingzhe's avatar limingzhe

fix: debug 清缓存

parent f86c2205
......@@ -420,10 +420,7 @@ export abstract class middleLayerBase extends cc.Component {
this.nodeList.forEach(node => {
node.active = false;
node.removeFromParent();
});
this.textureList.forEach(texture => {
while (texture?.refCount) {
......@@ -431,14 +428,27 @@ export abstract class middleLayerBase extends cc.Component {
}
});
[...this.atlasList, ...this.assetList].forEach(asset => {
[this.atlasList].forEach(asset => {
while (asset?.refCount) {
asset?.decRef();
}
cc.assetManager.releaseAsset(asset);
asset.destroy();
});
[this.assetList].forEach(asset => {
while (asset?.refCount) {
asset?.decRef();
}
cc.assetManager.releaseAsset(asset);
// asset.destroy();
asset.destroy();
});
this.nodeList.forEach(node => {
node.active = false;
node.removeFromParent();
});
}
nodeList = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment