mirror of https://github.com/axmolengine/axmol.git
Merge pull request #3755 from liamcindy/develop_action
[ci skip]change to use CC_SAFE_RELEASE_NULL and CC_SAFE_RETAIN
This commit is contained in:
commit
635f394e93
|
@ -56,19 +56,18 @@ ActionNode::~ActionNode()
|
|||
{
|
||||
if (_action == NULL)
|
||||
{
|
||||
CC_SAFE_RELEASE(_actionSpawn);
|
||||
CC_SAFE_RELEASE_NULL(_actionSpawn);
|
||||
}
|
||||
else
|
||||
{
|
||||
CC_SAFE_RELEASE(_action);
|
||||
CC_SAFE_RELEASE_NULL(_action);
|
||||
}
|
||||
|
||||
if (_frameArray != NULL)
|
||||
{
|
||||
_frameArray->removeAllObjects();
|
||||
CC_SAFE_RELEASE(_frameArray);
|
||||
CC_SAFE_RELEASE_NULL(_frameArray);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ActionNode::initWithDictionary(cs::JsonDictionary *dic,Object* root)
|
||||
|
@ -300,19 +299,23 @@ Spawn * ActionNode::refreshActionProperty()
|
|||
}
|
||||
}
|
||||
Sequence* cSequence = Sequence::create(cSequenceArray);
|
||||
if (cSequence != NULL)
|
||||
{
|
||||
cSpawnArray->addObject(cSequence);
|
||||
}
|
||||
}
|
||||
|
||||
if (_action == NULL)
|
||||
{
|
||||
CC_SAFE_RELEASE(_actionSpawn);
|
||||
CC_SAFE_RELEASE_NULL(_actionSpawn);
|
||||
}
|
||||
else
|
||||
{
|
||||
CC_SAFE_RELEASE(_action);
|
||||
CC_SAFE_RELEASE_NULL(_action);
|
||||
}
|
||||
|
||||
_actionSpawn = Spawn::create(cSpawnArray);
|
||||
CC_SAFE_RETAIN(_actionSpawn);
|
||||
return _actionSpawn;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue