00001 #ifndef DLSINGLETONDESTROYER_H 00002 #define DLSINGLETONDESTROYER_H 00003 00004 00028 template <class SINGLETON> 00029 class DLSingletonDestroyer { 00030 public: 00031 00035 DLSingletonDestroyer(){}; 00036 00041 ~DLSingletonDestroyer(){ 00042 delete _singleton; 00043 }; 00044 00049 void SetSingleton(SINGLETON* s){ 00050 _singleton = s; 00051 }; 00052 00053 private: 00056 SINGLETON* _singleton; 00057 }; 00058 #endif //DLSINGLETONDESTROYER_H