We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e187708 commit 774c886Copy full SHA for 774c886
cocos2dx/actions/CCInstantAction.cpp
@@ -269,6 +269,14 @@ namespace cocos2d {
269
}
270
bool CCCallFunc::initWithTarget(SelectorProtocol* pSelectorTarget)
271
{
272
+ if (pSelectorTarget)
273
+ {
274
+ pSelectorTarget->selectorProtocolRetain();
275
+ }
276
+ if (m_pSelectorTarget)
277
278
+ m_pSelectorTarget->selectorProtocolRelease();
279
280
m_pSelectorTarget = pSelectorTarget;
281
return true;
282
cocos2dx/include/CCInstantAction.h
@@ -172,6 +172,10 @@ namespace cocos2d {
172
173
virtual ~CCCallFunc()
174
175
176
177
178
179
180
/** creates the action with the callback
181
0 commit comments