Bug fix for ActionNode in CocosStudio, please don't use weak reference.

This commit is contained in:
James Chen 2015-12-07 15:06:50 +08:00
parent e1656264fc
commit 462796d2dd
1 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,8 @@ ActionNode::~ActionNode()
CC_SAFE_RELEASE_NULL(_action); CC_SAFE_RELEASE_NULL(_action);
CC_SAFE_RELEASE_NULL(_actionSpawn); CC_SAFE_RELEASE_NULL(_actionSpawn);
} }
CC_SAFE_RELEASE(_object);
for (auto object : _frameArray) for (auto object : _frameArray)
{ {
@ -363,7 +365,9 @@ int ActionNode::getActionTag()
void ActionNode::setObject(Ref* node) void ActionNode::setObject(Ref* node)
{ {
CC_SAFE_RELEASE(_object);
_object = node; _object = node;
CC_SAFE_RETAIN(_object);
} }
Ref* ActionNode::getObject() Ref* ActionNode::getObject()