summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2001-05-07 22:46:00 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2001-05-07 22:46:00 +0000
commit5a992220e8557e95ab35f2568361c64627110dfc (patch)
tree12dabcec672e80b7ee6b147a24361a0def9b2f19
parent6faa9e904239f207711fcf16040827bfb654ebdf (diff)
downloadATCD-5a992220e8557e95ab35f2568361c64627110dfc.tar.gz
ChangeLogTag:Mon May 7 15:21:43 2001 Ossama Othman <ossama@uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a30
-rw-r--r--TAO/tao/ORB_Core.cpp7
-rw-r--r--TAO/tao/Object_Ref_Table.cpp28
-rw-r--r--TAO/tao/Object_Ref_Table.h3
4 files changed, 43 insertions, 25 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 1519ae8c239..89b69a51a6f 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,19 @@
+Mon May 7 15:21:43 2001 Ossama Othman <ossama@uci.edu>
+
+ * tao/Object_Ref_Table.h:
+ * tao/Object_Ref_Table.cpp (destroy):
+
+ Added a new destroy() method to explicity release the object
+ references held in the object reference table. This method will
+ be called on ORB shutdown.
+
+ * tao/ORB_Core.cpp (shutdown):
+
+ Explicitly destroy the object reference table since it contains
+ references to objects, which themselves may contain reference to
+ this ORB. This fixes some problems with cyclic ORB lifetime
+ dependency problems.
+
Mon May 7 14:54:48 2001 Carlos O'Ryan <coryan@uci.edu>
* tao/Stub.h:
@@ -7,7 +23,7 @@ Mon May 7 14:54:48 2001 Carlos O'Ryan <coryan@uci.edu>
has reared its ugly head once again.
However, I think I finally nailed it: the ORB_Core was reference
counted by each object reference (via TAO_Stub), but the
- reference count was descremented in the TAO_Stub destructor
+ reference count was decremented in the TAO_Stub destructor
*before* the TAO_Profiles were destroyed.
This also fixes the crashes in Big_Oneways and Big_Twoways
tests.
@@ -549,20 +565,9 @@ Mon Apr 30 11:23:45 2001 Ossama Othman <ossama@uci.edu>
the new TAO_Cache_IntId::relinquish_transport() method. This
change removes two locks from the critical path. [Bug 878]
-<<<<<<< ChangeLog
- * tao/IIOP_Endpoint.cpp (hash):
-=======
* tao/Cache_Entries.h (relinquish_transport):
* tao/Cache_Entries.inl (relinquish_transport):
->>>>>>> 1.3407
-<<<<<<< ChangeLog
- Improved the speed of this hash operation by basing the hash on
- the IP address of the peer instead of computing a hash that
- involves some string operations (ACE::hash_pjw()). Since this
- hash method is called on each invocation, i.e. in the critical
- path, a performance improvement should be noticeable.
-=======
New method that causes the given TAO_Cache_IntId to relinquish
ownership of the TAO_Transport associated with it. This method
exists to get around some inflexibility in the
@@ -583,7 +588,6 @@ Mon Apr 30 11:23:45 2001 Ossama Othman <ossama@uci.edu>
involves some string operations (ACE::hash_pjw()). Since this
hash method is called on each invocation, i.e. in the critical
path, a performance improvement should be noticeable.
->>>>>>> 1.3407
* tao/PortableServer/Servant_Base.cpp:
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index b43274367d0..52d8e1a9b20 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -2066,6 +2066,11 @@ TAO_ORB_Core::shutdown (CORBA::Boolean wait_for_completion,
// Invoke Interceptor::destroy() on all registered interceptors.
this->destroy_interceptors (ACE_TRY_ENV);
ACE_CHECK;
+
+ // Explicitly destroy the object reference table since it
+ // contains references to objects, which themselves may contain
+ // reference to this ORB.
+ this->object_ref_table_.destroy ();
}
}
@@ -2078,7 +2083,7 @@ TAO_ORB_Core::destroy (CORBA_Environment &ACE_TRY_ENV)
// method. Everything else should go to the shutdown() method.
// Remember when the ORB Core is finally removed from the ORB table,
// the reference count goes to zero and fini() is called. fini()
- // calls shutdown() and does not call destory() since destroy() will
+ // calls shutdown() and does not call destroy() since destroy() will
// try to unbind from the ORB table again. Additional code should
// not be added to destroy() since there is no guarantee that
// orb->destroy() will ever be called by the user. Since TAO
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)
{
diff --git a/TAO/tao/Object_Ref_Table.h b/TAO/tao/Object_Ref_Table.h
index c19610b0b03..3539781cff6 100644
--- a/TAO/tao/Object_Ref_Table.h
+++ b/TAO/tao/Object_Ref_Table.h
@@ -70,6 +70,9 @@ public:
const char * id,
CORBA::Environment &ACE_TRY_ENV);
+ /// Explicitly destroy the contents of the object reference table.
+ void destroy (void);
+
private:
/// The canonical ACE_Map methods.