deleteObjects.h

Go to the documentation of this file.
00001 #ifndef DELETE_OBJECTS_H
00002 #define DELETE_OBJECTS_H
00003 
00013 #include <algorithm>
00014 
00015 
00019 struct DeleteObjects {
00025   template<typename T> void operator()(const T* ptr) const {
00026     if (ptr) {
00027       delete ptr;
00028       ptr = NULL;
00029     }
00030   }
00031 };
00032 
00033 #endif /* !DELETE_OBJECTS_H */
00034 

Generated on Mon Apr 13 22:52:05 2009 by  doxygen 1.5.7.1