Commit 1566c1c1 authored by liujiangnan's avatar liujiangnan

debug

parent feed43ef
......@@ -507,16 +507,34 @@ export default class NewClass extends middleLayerBase {
(<any>window).courseware.freeAllOcMethod();
// cc.assetManager.releaseAll();
// 释放骨骼动画
const arr = [];
const canvas = cc.find("Canvas");
const deepDrog = (nd) => {
const dragonDisplay = nd.getComponent(dragonBones.ArmatureDisplay);
if (dragonDisplay) {
console.log(`===========`);
dragonDisplay.destroy();
}
nd.children.forEach(child => {
deepDrog(child);
});
}
deepDrog(cc.find("Canvas"));
const bd = cc.assetManager.getBundle(this.oldSceneName);
bd.releaseAll();
cc.assetManager.removeBundle(bd);
cc.assetManager.assets.forEach(item => {
if(item.nativeUrl.indexOf(`h5template`)==-1 && item.nativeUrl.indexOf(`dist`)==-1 && item.nativeUrl.indexOf(`http`)>-1) {
cc.assetManager.releaseAsset(item);
}
});
cc.director.loadScene("middleLayer_for_debug", (err, scene) => {
// 手机端强制垃圾回收
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID) {
......
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