#ifndef POINTER_H #define POINTER_H namespace JGadget { template class TPointer { public: TPointer(T* ptr) : mPtr(ptr) {} ~TPointer() {} void set(T* ptr) { mPtr = ptr; } T* mPtr; }; template class TPointer_delete : public TPointer { public: TPointer_delete(T* ptr) : TPointer(ptr) {} ~TPointer_delete() { delete mPtr; } }; } #endif