Commit 5ec84ec2 authored by limingzhe's avatar limingzhe

fix: debug 清缓存

parent 89e407ac
......@@ -420,7 +420,10 @@ export abstract class middleLayerBase extends cc.Component {
this.nodeList.forEach(node => {
node.active = false;
node.removeFromParent();
});
this.textureList.forEach(texture => {
while (texture?.refCount) {
......@@ -432,22 +435,19 @@ export abstract class middleLayerBase extends cc.Component {
while (asset?.refCount) {
asset?.decRef();
}
cc.assetManager.releaseAsset(asset);
asset.destroy();
// cc.assetManager.releaseAsset(asset);
// asset.destroy();
});
[...this.assetList].forEach(asset => {
while (asset?.refCount) {
asset?.decRef();
}
cc.assetManager.releaseAsset(asset);
asset.destroy();
// cc.assetManager.releaseAsset(asset);
// asset.destroy();
});
this.nodeList.forEach(node => {
node.active = false;
node.removeFromParent();
});
}
......
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