411 REFERENCE · Wikibooks
C++ Language/Std/Stl/CollectionClasses/SequenceCollections/Vector/RemovingItems
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
The erase() function removes an iterator-specified item from the vector, but doesn't do anything to that removed item.
So if the item-type was a pointer, then you would still be responsible for any manual destruction of the actual object.
To remove all items, use clear().
To remove the last item, use pop_back().
Additional information about removing items from a vector (includes interactive examples)