What is the shortest chunk of C++ you can come up with to safely clean up a std::vector
or std::list
of pointers? (assuming you have to call delete on the pointers?)
list<Foo*> foo_list;
I'd rather not use Boost or wrap my pointers with smart pointers.
See Question&Answers more detail:os