Commit de075337 authored by limingzhe's avatar limingzhe

fix: debug 清缓存

parent b948676e
......@@ -194,6 +194,7 @@ export abstract class middleLayerBase extends cc.Component {
console.log('喵喵喵4: ' + this.textureList.length);
this.loadBundleLock = true; // 加锁
this.currentBundleInfo = { sceneName, version, bondleUrl };
console.log("[middleLayer_for_NJ_lite]-[loadBundle] currentBundleInfo=", JSON.stringify(this.currentBundleInfo))
......@@ -410,7 +411,6 @@ export abstract class middleLayerBase extends cc.Component {
clearDragonDisplayAssetList() {
console.log('喵喵喵: clearDragonDisplayAssetList');
console.log('喵喵喵: ' + this.nodeList.length);
......@@ -418,41 +418,20 @@ export abstract class middleLayerBase extends cc.Component {
console.log('喵喵喵: ' + this.assetList.length);
console.log('喵喵喵: ' + this.textureList.length);
this.textureList.forEach(texture => {
while (texture?.refCount) {
texture?.decRef();
}
});
[...this.atlasList].forEach(asset => {
[...this.atlasList, ...this.assetList].forEach(asset => {
asset.decRef();
cc.assetManager.releaseAsset(asset);
asset.destroy();
while (asset?.refCount) {
asset?.decRef();
}
// cc.assetManager.releaseAsset(asset);
});
[...this.assetList].forEach(asset => {
asset.destroy();
while (asset?.refCount) {
asset?.decRef();
}
// cc.assetManager.releaseAsset(asset);
});
this.nodeList.forEach(node => {
node.active = false;
node.removeFromParent();
});
this.textureList.forEach(texture => {
texture.decRef();
});
}
nodeList = null;
......@@ -460,14 +439,12 @@ export abstract class middleLayerBase extends cc.Component {
assetList = null;
textureList = null;
getDragonDisplayAssetList(node) {
const dragonDisplay = node.getComponent(dragonBones.ArmatureDisplay);
if (dragonDisplay) {
const atlas = dragonDisplay.dragonAtlasAsset;
const asset = dragonDisplay.dragonAsset;
if (atlas && atlas.texture) {
if (atlas.texture) {
if (atlas.texture.nativeUrl.includes('h5template')) {
node.children.forEach(child => {
this.getDragonDisplayAssetList(child);
......
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