From 28779f3554b7710741651c2c5e4e59fa03b32df9 Mon Sep 17 00:00:00 2001 From: PP Date: Thu, 29 Mar 2018 17:44:13 +0800 Subject: [PATCH 1/3] destroy audio element when stop destroy audio element when stop destroy audio element when stop --- cocos2d/audio/CCAudioEngine.js | 4 ++++ cocos2d/core/components/CCAudioSource.js | 1 + 2 files changed, 5 insertions(+) diff --git a/cocos2d/audio/CCAudioEngine.js b/cocos2d/audio/CCAudioEngine.js index 9a310195ff..828417a0f7 100644 --- a/cocos2d/audio/CCAudioEngine.js +++ b/cocos2d/audio/CCAudioEngine.js @@ -41,6 +41,7 @@ var getAudioFromPath = function (path) { var oldId = list.shift(); var oldAudio = id2audio[oldId]; oldAudio.stop(); + oldAudio.destroy(); } audio = new Audio(path); @@ -365,6 +366,8 @@ var audioEngine = { return false; audio.off('load', audio.__callback); audio.stop(); + audio.destroy(); + return true; }, @@ -380,6 +383,7 @@ var audioEngine = { var audio = id2audio[id]; if (audio && audio.stop) { audio.stop(); + audio.destroy(); audio.off('load', audio.__callback); } } diff --git a/cocos2d/core/components/CCAudioSource.js b/cocos2d/core/components/CCAudioSource.js index a92e6505f8..c33a73bc98 100644 --- a/cocos2d/core/components/CCAudioSource.js +++ b/cocos2d/core/components/CCAudioSource.js @@ -231,6 +231,7 @@ var AudioSource = cc.Class({ onDestroy: function () { this.stop(); + this.audio.destroy(); cc.audioEngine.uncache(this._clip); }, From 4833f9f207e0ba7cd9d1ae62f848b8379100a8d9 Mon Sep 17 00:00:00 2001 From: Jare Guo Date: Mon, 9 Apr 2018 17:20:26 +0800 Subject: [PATCH 2/3] sync status for records used in Timeline editor --- cocos2d/core/CCNode.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cocos2d/core/CCNode.js b/cocos2d/core/CCNode.js index 5dfcfd284c..6f61247562 100644 --- a/cocos2d/core/CCNode.js +++ b/cocos2d/core/CCNode.js @@ -2508,6 +2508,15 @@ var Node = cc.Class({ this._updateDummySgNode(); var sizeProvider = this._sizeProvider; + if (sizeProvider) { + // sync status for records used in Timeline editor + var sgComponent = this.getComponent(cc._SGComponent); + if (sgComponent && sgComponent._sgNode === sizeProvider && !(sgComponent._objFlags & Flags.IsPreloadStarted)) { + sgComponent._removeSgNode(); + this._sizeProvider = sizeProvider = null; + } + } + if (sizeProvider) { sizeProvider.setContentSize(this._contentSize); if (sizeProvider instanceof _ccsg.Node) { From 2e73336e6c702796182b3c93de7b382e49b138e5 Mon Sep 17 00:00:00 2001 From: Cocos Ass Date: Fri, 13 Apr 2018 19:21:01 +0800 Subject: [PATCH 3/3] Circleic Update to 2.0 1.9: Auto stash before revert of "Update config.yml" --- .circleci/config.yml | 26 ++++++++++++++++++++++++++ circle.yml | 8 -------- 2 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000..94e8389fc0 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,26 @@ +# Check https://circleci.com/docs/2.0/language-javascript/ for more details +# +version: 2 +jobs: + test: + steps: + - run: + command: npm test + setup: + docker: + - image: circleci/node:latest + steps: + - checkout + - run: + command: npm install -g gulp + - run: + command: npm install gulp-qunit + + +workflows: + version: 2 + build-test: + jobs: + - test: + requires: + - setup diff --git a/circle.yml b/circle.yml deleted file mode 100644 index c9d4fd3700..0000000000 --- a/circle.yml +++ /dev/null @@ -1,8 +0,0 @@ -machine: - node: - version: 6.12.3 - -dependencies: - pre: - - npm install -g gulp - - npm install gulp-qunit