diff --git a/cocos2d/core/CCNode.js b/cocos2d/core/CCNode.js index 973de7e60e..c3d89c4d43 100644 --- a/cocos2d/core/CCNode.js +++ b/cocos2d/core/CCNode.js @@ -307,21 +307,21 @@ var Node = cc.Class({ // destroy immediate so its _onPreDestroy can be called component._destroyImmediate(); } + + // Actions + this.stopAllActions(); + + // Schedules + this.unscheduleAllCallbacks(); // Remove all listeners + cc.eventManager.removeListeners(this); for (i = 0, len = this.__eventTargets.length; i < len; ++i) { var target = this.__eventTargets[i]; target && target.targetOff(this); } this.__eventTargets.length = 0; - if (this._touchListener) { - cc.eventManager.removeListener(this._touchListener); - } - if (this._mouseListener) { - cc.eventManager.removeListener(this._mouseListener); - } - // remove from persist if (this._persistNode) { cc.game.removePersistRootNode(this);