summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2001-05-08 16:16:11 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2001-05-08 16:16:11 +0000
commitba6f7983cd231838182424321c7956a40366eb0e (patch)
tree63b596b419698d44f43ddedcc5b72c0199231364
parent3e62af49868aa617b78e6ffbfeb2d80c6702dbc3 (diff)
downloadATCD-ba6f7983cd231838182424321c7956a40366eb0e.tar.gz
ChangeLogTag:Tue May 8 08:56:32 2001 Ossama Othman <ossama@uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a15
-rw-r--r--TAO/tao/Object_Ref_Table.cpp15
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 <ossama@uci.edu>
+
+ * tao/Object_Ref_Table.cpp (TAO_Object_Ref_Table, destroy):
+
+ Reverted the change "Tue May 8 09:01:13 2001 Balachandran
+ Natarajan <bala@cs.wustl.edu>". 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 <bala@cs.wustl.edu>
* 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