This commit is contained in:
Ming 2010-09-06 03:48:04 +00:00
parent b035165e25
commit 69762e4b4c
1 changed files with 8 additions and 0 deletions

View File

@ -36,7 +36,15 @@ CCTouchDelegate* CCTouchHandler::getDelegate(void)
void CCTouchHandler::setDelegate(CCTouchDelegate *pDelegate) void CCTouchHandler::setDelegate(CCTouchDelegate *pDelegate)
{ {
if (m_pDelegate)
{
pDelegate->keep();
}
m_pDelegate = pDelegate; m_pDelegate = pDelegate;
if (m_pDelegate)
{
m_pDelegate->destroy();
}
} }
int CCTouchHandler::getPriority(void) int CCTouchHandler::getPriority(void)