#include <CntrCleaner.hh>
I.e., it will clean up all the pointer elements in a container. The element type of the container can itself be a container, recursively, as long as one of the container types in the chain has pointers as element type. You could therefore have a list of vectors of deques of pointers.
The only requirement on the container is that it have forward iterators with a begin() and end() method, and prefix op++ and op*. You should be able to add a specialization of CntrCleaner for your own container if it doesn't satisfy the requirements. The specializations for std::stack and std::queue (in separate files named STL*Cleaner.hh) are exampes of this, as they too do not have iterators.
Definition at line 46 of file CntrCleaner.hh.
Static Public Methods | |
void | execute (const T &obj) |
Generic method for containers. |