diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-04-05 02:48:52 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-04-05 02:48:52 +0000 |
commit | 89570a6c5857f286bc312133ac75e2426756767d (patch) | |
tree | aea93ebdc89f8c3fe51a92abb45407793ae1084b | |
parent | c5ee8fb010a8a64b313ed439a1761a68d41afb01 (diff) | |
download | ATCD-89570a6c5857f286bc312133ac75e2426756767d.tar.gz |
*** empty log message ***
-rw-r--r-- | ace/Hash_Map_Manager.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ace/Hash_Map_Manager.cpp b/ace/Hash_Map_Manager.cpp index 1116cff29dd..66ed83145ce 100644 --- a/ace/Hash_Map_Manager.cpp +++ b/ace/Hash_Map_Manager.cpp @@ -138,6 +138,8 @@ ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::ACE_Hash_Map_Manager (ACE_Alloca template <class EXT_ID, class INT_ID, class ACE_LOCK> int ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::close_i (void) { + // Protect against double deletion in case the destructor also gets + // called. if (this->table_ != 0) { // Iterate through the entire map calling the destuctor of each @@ -160,10 +162,11 @@ ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::close_i (void) entry.ACE_Hash_Map_Entry<EXT_ID, INT_ID>::~ACE_Hash_Map_Entry (); } - // Free table memory + // Free table memory. this->allocator_->free (this->table_); - this->table_ = 0; this->cur_size_ = 0; + // Should be done last... + this->table_ = 0; } return 0; } |