From ba6f7983cd231838182424321c7956a40366eb0e Mon Sep 17 00:00:00 2001 From: Ossama Othman Date: Tue, 8 May 2001 16:16:11 +0000 Subject: ChangeLogTag:Tue May 8 08:56:32 2001 Ossama Othman --- TAO/ChangeLogs/ChangeLog-02a | 15 +++++++++++++++ TAO/tao/Object_Ref_Table.cpp | 15 ++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index b7f9cb5c816..3611e129cdc 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,18 @@ +Tue May 8 08:56:32 2001 Ossama Othman + + * tao/Object_Ref_Table.cpp (TAO_Object_Ref_Table, destroy): + + Reverted the change "Tue May 8 09:01:13 2001 Balachandran + Natarajan ". The call to destroy() was + correct since not all applications call ORB::shutdown() (or + ORB::destroy(). In such cases, memory leaks will occur since + the object reference table destroy() method is not explicitly + called. + + The correct fix for the problem was to call unbind_all() on the + underlying hash table in the destroy() method. Doing so makes + it safe to call the destroy() method more than once. + Tue May 8 10:02:47 2001 Balachandran Natarajan * tao/ORB_Core.cpp: Reverted this change "Tue May 8 07:32:15 2001 diff --git a/TAO/tao/Object_Ref_Table.cpp b/TAO/tao/Object_Ref_Table.cpp index c363349772d..b9299716b1c 100644 --- a/TAO/tao/Object_Ref_Table.cpp +++ b/TAO/tao/Object_Ref_Table.cpp @@ -9,7 +9,9 @@ #include "CORBA_String.h" #include "debug.h" -ACE_RCSID(tao, Object_Ref_Table, "$Id$") +ACE_RCSID (tao, + Object_Ref_Table, + "$Id$") // **************************************************************** @@ -20,12 +22,9 @@ TAO_Object_Ref_Table::TAO_Object_Ref_Table (void) TAO_Object_Ref_Table::~TAO_Object_Ref_Table (void) { - // @@ We seem to be calling destroy () twice in normal - // circumstances. One from ORB_Core::shutdown () and another from - // here. Seems goofy in a first pass.. Bala - // this->destroy (); - - this->table_.close (); // Only call close() in this destructor! + // Must explicitly call destroy() in the destructor since not all + // applications will invoke ORB::shutdown() or ORB::destroy(). + this->destroy (); } void @@ -93,6 +92,8 @@ TAO_Object_Ref_Table::destroy (void) // Release the Object. CORBA::release ((*i).int_id_); } + + this->table_.unbind_all (); } TAO_Object_Ref_Table::Iterator -- cgit v1.2.1