Skip to content
This repository was archived by the owner on Mar 17, 2022. It is now read-only.

Commit bab9122

Browse files
committed
remove retain release for actions.
1 parent ba471a8 commit bab9122

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

assets/scripts/UI/ButtonScaler.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ cc.Class({
1515
self.button = self.getComponent(cc.Button);
1616
self.scaleDownAction = cc.scaleTo(self.transDuration, self.pressedScale);
1717
self.scaleUpAction = cc.scaleTo(self.transDuration, self.initScale);
18-
self.scaleDownAction.retain();
19-
self.scaleUpAction.retain();
2018
function onTouchDown (event) {
2119
this.stopAllActions();
2220
audioMng.playButton();
@@ -29,10 +27,5 @@ cc.Class({
2927
this.node.on('touchstart', onTouchDown, this.node);
3028
this.node.on('touchend', onTouchUp, this.node);
3129
this.node.on('touchcancel', onTouchUp, this.node);
32-
},
33-
34-
onDestroy: function () {
35-
this.scaleUpAction.release();
36-
this.scaleDownAction.release();
3730
}
3831
});

0 commit comments

Comments
 (0)