#include <common.h>
Public Member Functions | |
| void | operator() (T *&o) |
| Delete o and possibly set to NULL. | |
This class is useful for deleting vector or lists of objects and can be used in the following way:
ElemDeleter<Sprite> ed; for_each(spriteList.begin(), spriteList.end(), ed);
This wold invoke operator() of the ed object for each object in the list of Sprite*s, spriteList.
| T | The type of pointer to delete, note that to delete an O* you should specify O as T. | |
| zero | If true, set the pointer to NULL after deleting. Poniters are always NULLed if NDEBUG was not defined. |
| void ElemDeleter< T, zero >::operator() | ( | T *& | o | ) | [inline] |
Delete o and possibly set to NULL.
1.4.7