diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-10-26 01:43:14 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-10-26 01:43:14 +0000 |
commit | 5d3b87a68444cfe7d9b29f149feb87a907b5dec1 (patch) | |
tree | 3c9c4134b97200d8a4a900715cdfac543ebd2159 /tests/Hash_Map_Manager_Test.cpp | |
parent | 532c705f54375a9cc089861966d3db61bc4d5644 (diff) | |
download | ATCD-5d3b87a68444cfe7d9b29f149feb87a907b5dec1.tar.gz |
*** empty log message ***
Diffstat (limited to 'tests/Hash_Map_Manager_Test.cpp')
-rw-r--r-- | tests/Hash_Map_Manager_Test.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/tests/Hash_Map_Manager_Test.cpp b/tests/Hash_Map_Manager_Test.cpp index 2d5635498ae..4d9f3541a9b 100644 --- a/tests/Hash_Map_Manager_Test.cpp +++ b/tests/Hash_Map_Manager_Test.cpp @@ -34,19 +34,34 @@ HASH_STRING_ENTRY::ACE_Hash_Map_Entry (char *const &ext_id, char *const &int_id, - HASH_STRING_ENTRY *ptr) + HASH_STRING_ENTRY *next, + HASH_STRING_ENTRY *prev) : ext_id_ (ACE_OS::strdup (ext_id)), int_id_ (ACE_OS::strdup (int_id)), - next_ (ptr) + next_ (next), + prev_ (prev) { ACE_DEBUG ((LM_DEBUG, "Creating `%s' and `%s'\n", ext_id_, int_id_)); } +HASH_STRING_ENTRY::ACE_Hash_Map_Entry (HASH_STRING_ENTRY *next, + HASH_STRING_ENTRY *prev) + : ext_id_ (0), + int_id_ (0), + next_ (next), + prev_ (prev) +{ +} + HASH_STRING_ENTRY::~ACE_Hash_Map_Entry (void) { - ACE_DEBUG ((LM_DEBUG, "Freeing `%s' and `%s'\n", ext_id_, int_id_)); - ACE_OS::free (ext_id_); - ACE_OS::free (int_id_); + char *key = ext_id_; + char *value = int_id_; + + if (key != 0 && value != 0) + ACE_DEBUG ((LM_DEBUG, "Freeing `%s' and `%s'\n", key, value)); + ACE_OS::free (key); + ACE_OS::free (value); } // We need this template specialization since KEY is defined as a |