EziFacebookFriend* EziFacebookFriend::create()
{
    EziFacebookFriend* fbFriend = new EziFacebookFriend();
    if (fbFriend)
    {
        fbFriend->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(fbFriend);
        return NULL;
    }
    
    return fbFriend;
}
示例#2
0
EziFacebookFriend* EziFacebookFriend::create(const std::string& fbID,const std::string& name, long score, const std::string& photoPath, bool installed)
{
    EziFacebookFriend* fbFriend = new EziFacebookFriend();
    if (fbFriend)
    {
        fbFriend->_fbID = fbID;
        fbFriend->_name = name;
        fbFriend->_score = score;
        fbFriend->_photoPath = photoPath;
        fbFriend->_installed = installed;
        fbFriend->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(fbFriend);
        return NULL;
    }
    
    return fbFriend;
}