I figured its better to let the vector store pointers to the dogs Dogs with performance in mind.
The Dog1,Dog2 and Dog3 objects are automatically deleted when they go out of scope, fine all is good!
But what about my vector with pointers? Do I need to do anything with them to prevent anything bad to happen? Will they also be taken care of automatically when out of scope?
Vectors are only aware of the objects they contain. When a pointer is destructed, nothing happens with the object it points to. In other words, nothing (outside the vector) happens when a vector of pointers is destructed.