diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-05-07 22:46:00 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-05-07 22:46:00 +0000 |
commit | 5a992220e8557e95ab35f2568361c64627110dfc (patch) | |
tree | 12dabcec672e80b7ee6b147a24361a0def9b2f19 /TAO/tao/Object_Ref_Table.cpp | |
parent | 6faa9e904239f207711fcf16040827bfb654ebdf (diff) | |
download | ATCD-5a992220e8557e95ab35f2568361c64627110dfc.tar.gz |
ChangeLogTag:Mon May 7 15:21:43 2001 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/tao/Object_Ref_Table.cpp')
-rw-r--r-- | TAO/tao/Object_Ref_Table.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/TAO/tao/Object_Ref_Table.cpp b/TAO/tao/Object_Ref_Table.cpp index c1bfcadb7c4..a101a4d0b41 100644 --- a/TAO/tao/Object_Ref_Table.cpp +++ b/TAO/tao/Object_Ref_Table.cpp @@ -20,18 +20,9 @@ TAO_Object_Ref_Table::TAO_Object_Ref_Table (void) TAO_Object_Ref_Table::~TAO_Object_Ref_Table (void) { - for (Iterator i = this->begin (); - i != this->end (); - ++i) - { - // Deallocate the id. - CORBA::string_free (ACE_const_cast (char *, (*i).ext_id_)); + this->destroy (); - // Release the Object. - CORBA::release ((*i).int_id_); - } - - this->table_.close (); + this->table_.close (); // Only call close() in this destructor! } void @@ -86,6 +77,21 @@ TAO_Object_Ref_Table::resolve_initial_references ( return this->find (id); // Returns a duplicate. } +void +TAO_Object_Ref_Table::destroy (void) +{ + for (Iterator i = this->begin (); + i != this->end (); + ++i) + { + // Deallocate the id. + CORBA::string_free (ACE_const_cast (char *, (*i).ext_id_)); + + // Release the Object. + CORBA::release ((*i).int_id_); + } +} + TAO_Object_Ref_Table::Iterator TAO_Object_Ref_Table::begin (void) { |