The memory holding the pointers, yes. The memory holding pointer's contents, no. Also, you should free the vector itself by writing delete vec; at the end of the program, but I guess, that it's not what you are asking for.
Sign up to request clarification or add additional context in comments.
Comments
2
No. You should use delete, when you use new (and not use smart-pointers).
And for elements of vector - no, the memory will not be deallocated, you should use delete on each element in vector. Something like
vector::push_backtakes an argument of typeTand notvoid?