I have a vector whose elements are pointers to objects. Documentation says that an erase will not deallocate memory allocated to that object (for the reason that the vector controls its own memory not the memory of the pointer of the object).
How do I deallocate the memory that my object is using from vector?