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 delet
std::vector
std::list
for (list::const_iterator i = foo_list.begin(), e = foo_list.end(); i != e; ++i) delete *i; foo_list.clear();