summaryrefslogtreecommitdiff
path: root/ace/Cache_Map_Manager_T.cpp
diff options
context:
space:
mode:
authorkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-23 19:06:17 +0000
committerkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-23 19:06:17 +0000
commitd8b409c94c6f308c988b58e9f8f4fd23814f2d76 (patch)
treebf189a0e7df45ab05dea732be83d5d3a73e5c17a /ace/Cache_Map_Manager_T.cpp
parentab99b20936a1c8c2432efa33a946f6b994c3f42c (diff)
downloadATCD-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.cpp19
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 ();