CCObject* EziFacebookFriend::copyWithZone(CCZone *pZone) { CCZone* pNewZone = NULL; EziFacebookFriend* pCopy = NULL; if(pZone && pZone->m_pCopyObject) { //in case of being called at sub class pCopy = (EziFacebookFriend*)(pZone->m_pCopyObject); } else { pCopy = new EziFacebookFriend(); pNewZone = new CCZone(pCopy); } pCopy->setName(getName()); pCopy->setID(getFBID()); pCopy->setScore(getScore()); pCopy->setPhotoPath(getPhotoPath()); pCopy->setInstalled(isInstalled()); pCopy->setPhotoURL(getPhotoURL()); //pCopy->initWithAction((CCActionInterval *)(m_pInner->copy()->autorelease())); CC_SAFE_DELETE(pNewZone); return pCopy; }