What do I need to do before deleting elements in a vector of pointers to dynamically allocated objects?
Yes Vectors are implemented using template memory allocators that take care of the memory management for you, so they are somewhat special. But as a general rule of thumb, you don’t have to call delete on variables that aren’t declared with the new keyword because of the difference between stack and heap allocation. If stuff … Read more