diff options
author | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2011-05-01 17:03:12 +0000 |
---|---|---|
committer | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2011-05-01 17:03:12 +0000 |
commit | 65cfe455aae323a274ef6e504e7c452076039bbc (patch) | |
tree | a29ec04daab84a45c994d08571bc4dacbc6048ae /interface | |
parent | c06583ae8abf07eac82eac1e9a6f487b68c7b999 (diff) | |
download | opt-utilities-65cfe455aae323a274ef6e504e7c452076039bbc.tar.bz2 |
git-svn-id: file:///home/svn/opt_utilities@191 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'interface')
-rw-r--r-- | interface/type_depository.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/interface/type_depository.hpp b/interface/type_depository.hpp index d0e0bfb..9bacc9b 100644 --- a/interface/type_depository.hpp +++ b/interface/type_depository.hpp @@ -53,7 +53,7 @@ namespace opt_utilities ~holder() { - delete ptr; + destroy(); } holder& operator=(const holder& rhs) @@ -62,7 +62,7 @@ namespace opt_utilities { return *this; } - delete ptr; + destroy(); ptr=rhs.ptr; const_cast<holder&>(rhs).ptr=0; } @@ -77,7 +77,10 @@ namespace opt_utilities void destroy() { - delete ptr; + if(ptr) + { + ptr->destroy(); + } } T* get()const |