Open michaelbaisch opened 7 years ago
Yeah it's on the list to do. For now you'll have to use new/delete (or probably std::shared_ptr to do that for you).
sorry for my noob question.
could you give a short example please, on how to do the new/delete.
The below still cause Call to deleted constructor of 'ofxHapPlayer' error.
vector<ofxHapPlayer>videos;
for(int i=0; i<maxVideos; i++){
videos.push_back(ofxHapPlayer());
}
thanks.
oh got it.
ofxHapPlayer* videos;
videos = new ofxHapPlayer[maxVideos];
or use a shared_ptr and let it take care of delete for you
std::vector<std::shared_ptr<ofxHapPlayer>> videos;
// ...
videos.push_back(std::make_shared<ofxHapPlayer>());
The work on this branch is very much appreciated. Everything basically works, expect when I tried using a vector to store instances of ofxHapPlayer. It makes sense since the copy constructor isn't implemented. Is there a better way to store dynamically created ofxHapPlayers? If not then is this I guess a way of saying I would love to see this implemented :) (I would do it myself but I know it's very difficult to get it right with pointers and such).