i would like to know if is safe to do this:
std::vector<int*> v;
...
//no deleting
v.erase(v.begin());
With safe i mean that by doing this, we are not creating garbage, and so that std::vector<T>::erase
is calling himself delete pointer;
, or if instead i should have done manually the deleting:
std::vector<int*> v;
...
delete v[0];
v.erase(v.begin());