Commit 5a5ff1d4 authored by liujiangnan's avatar liujiangnan

debug

parent 4e721d7b
...@@ -505,25 +505,27 @@ export default class NewClass extends middleLayerBase { ...@@ -505,25 +505,27 @@ export default class NewClass extends middleLayerBase {
cc.game.removePersistRootNode(this.node); cc.game.removePersistRootNode(this.node);
cc.audioEngine.stopAll(); cc.audioEngine.stopAll();
(<any>window).courseware.freeAllOcMethod(); (<any>window).courseware.freeAllOcMethod();
cc.director.loadScene("middleLayer_for_debug", (err, scene) => { cc.assetManager.releaseAll();
this.showUI(); setTimeout(() => {
// 手机端强制垃圾回收 cc.director.loadScene("middleLayer_for_debug", (err, scene) => {
cc.assetManager.releaseAll(); this.showUI();
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID) { // 手机端强制垃圾回收
cc.sys.garbageCollect(); if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID) {
setTimeout(() => {
cc.sys.garbageCollect(); cc.sys.garbageCollect();
setTimeout(() => { setTimeout(() => {
cc.sys.garbageCollect(); cc.sys.garbageCollect();
setTimeout(() => { setTimeout(() => {
cc.sys.garbageCollect(); cc.sys.garbageCollect();
setTimeout(() => {
cc.sys.garbageCollect();
}, 1000);
}, 1000); }, 1000);
}, 1000); }, 1000);
}, 1000); }
} // const bd = cc.assetManager.getBundle(this.oldSceneName);
// const bd = cc.assetManager.getBundle(this.oldSceneName); // bd.releaseAll();
// bd.releaseAll(); });
}); }, 5000);
}) })
.start(); .start();
}); });
......
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