mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 09:32:38 +08:00
Fix purgeDirector leak
This commit is contained in:
@@ -412,7 +412,12 @@ cc.Director.prototype = {
|
||||
|
||||
cc.renderer.clear();
|
||||
|
||||
this._scene = null;
|
||||
if (!CC_EDITOR) {
|
||||
if (cc.isValid(this._scene)) {
|
||||
this._scene.destroy();
|
||||
}
|
||||
this._scene = null;
|
||||
}
|
||||
|
||||
this.stopAnimation();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user