I have a collection of pointers, for example std::vector<std::string*>
.
Which is the most appropriate way to automatically delete the instances pointed by its items when the collection is deleted?
When I delete the collection, I would automatically like to delete all pointed items.