In c++ client api, why so many new ? many infos returned from the api is new . why not use the value ,not the pointers? Or, why not use stl 's smart pointer?
The SFSRoom::PlayerList and SFSRoom::SpectatorList()
Code: Select all
for (iterator = userManager->GetUserList()->begin(); iterator != userManager->GetUserList()->end(); iterator++)
{
....
}
//File SFSUserManager.cpp line:178
vector<User *> *SFSUserManager::GetUserList()
{
vector<User *>* result = new vector<User *>();
......
}