Is it safe to use the classes that you use to instance things like Sound and Sprite? Of course you don't want to with the Texture and SoundBuffer classes.
I am using them in std::vector and I know that from time to time vector will move them around, and when I want to erase one, i swap it with the last one then pop_back() the last one, is this going to cause trouble?
Second issue that maybe related to the first.
I have a std::vector<Sound>, when ever i want to play a new sound like a laser shot, i create a Sound and use the laser sound buffer to construct the sound. Then I call push back it into the vector and then use back().play().
I a loop to check the status and if the status of one of these sounds is stopped then I swap it with the last one then pop_back() to remove it.
However occasionally one of the sounds doesn't play when it should and sometimes one seems to get cut off. Is the use of vector messing them up or something else my problem?