CCActionObject::play(CCCallfunc *func) function have bug??


#1

i think this function may retain callback function. and release…

but it doesn’t so if i play UIAnimation. the program will be crashed.

i solve this problem by change Engine code


ActionObject::~ActionObject()
{
	m_ActionNodeList->removeAllObjects();
	m_ActionNodeList->release();
	//added
        if(this->m_CallBack)
	    this->m_CallBack->release();
        // end
	CC_SAFE_RELEASE(m_pScheduler);
}


void ActionObject::play(CCCallFunc* func)
{
	this->m_CallBack = func;
        // added
	this->m_CallBack->retain();
        // end
	this->play();
}

now it seems okay to me…