Vector<PaoPao*>::iterator ite = m_pVecPaoPao.begin();
while (ite != m_pVecPaoPao.end())
{
if ((*ite)->isDead() == true)
{
(*ite)->getPaoPao()->removeFromParentAndCleanup(true);
ite = m_pVecPaoPao.erase(ite);
}
else{
++ite;
}
}
while (ite != m_pVecPaoPao.end())
{
if ((*ite)->isDead() == true)
{
(*ite)->getPaoPao()->removeFromParentAndCleanup(true);
ite = m_pVecPaoPao.erase(ite);
}
else{
++ite;
}
}