Fix purgeDirector leak

This commit is contained in:
pandamicro
2018-02-28 16:48:37 +08:00
parent 6b839d7363
commit 979ffb587a
+6 -1
View File
@@ -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();