-rw-r--r-- | microkde/kstaticdeleter.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/microkde/kstaticdeleter.h b/microkde/kstaticdeleter.h index 190f3e4..dfd3929 100644 --- a/microkde/kstaticdeleter.h +++ b/microkde/kstaticdeleter.h @@ -19,17 +19,19 @@ * Boston, MA 02111-1307, USA. * */ #ifndef _KSTATIC_DELETER_H_ #define _KSTATIC_DELETER_H_ template<class type> class KStaticDeleter { public: KStaticDeleter() {}; - type *setObject( type *obj, bool isArray = false) { return obj; } - virtual ~KStaticDeleter() {}; + type *setObject( type *obj, bool isArray = false) { _mobj = obj;return obj; } + virtual ~KStaticDeleter() {delete _mobj;}; + private: + type* _mobj; }; #endif |