diff options
author | kirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-23 19:06:17 +0000 |
---|---|---|
committer | kirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-23 19:06:17 +0000 |
commit | d8b409c94c6f308c988b58e9f8f4fd23814f2d76 (patch) | |
tree | bf189a0e7df45ab05dea732be83d5d3a73e5c17a /ace/Cache_Map_Manager_T.cpp | |
parent | ab99b20936a1c8c2432efa33a946f6b994c3f42c (diff) | |
download | ATCD-d8b409c94c6f308c988b58e9f8f4fd23814f2d76.tar.gz |
Added close method call in the destructor
Diffstat (limited to 'ace/Cache_Map_Manager_T.cpp')
-rw-r--r-- | ace/Cache_Map_Manager_T.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/ace/Cache_Map_Manager_T.cpp b/ace/Cache_Map_Manager_T.cpp index 0a7cc36ec46..f1f6361ca60 100644 --- a/ace/Cache_Map_Manager_T.cpp +++ b/ace/Cache_Map_Manager_T.cpp @@ -45,6 +45,7 @@ ACE_Cache_Map_Manager<T_2>::ACE_Cache_Map_Manager (size_t size, template <T_1> ACE_Cache_Map_Manager<T_2>::~ACE_Cache_Map_Manager (void) { + this->close (); } template <T_1> int @@ -65,26 +66,22 @@ ACE_Cache_Map_Manager<T_2>::open (size_t length, this->delete_caching_strategy_ == 1 && caching_s != 0) { - delete this->caching_strategy_; - this->caching_strategy_ = 0; - - this->delete_caching_strategy_ = delete_caching_strategy; - + this->delete_caching_strategy_ = 0; } if (caching_s != 0) - this->caching_strategy_ = caching_s; + { + this->caching_strategy_ = caching_s; + this->delete_caching_strategy_ = delete_caching_strategy; + } else if (this->caching_strategy_ == 0) { - ACE_NEW_RETURN (this->caching_strategy_, CACHING_STRATEGY, -1); - - this->delete_caching_strategy_ = delete_caching_strategy; - + this->delete_caching_strategy_ = 1; } return 0; @@ -95,9 +92,7 @@ ACE_Cache_Map_Manager<T_2>::close (void) { if (this->delete_caching_strategy_ == 1) delete this->caching_strategy_; - this->delete_caching_strategy_ = 0; - this->caching_strategy_ = 0; return this->map_.close (); |