summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-08 01:39:29 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-08 01:39:29 +0000
commit92bf7a63efcfbf56be7cd33d898c0eea07391103 (patch)
tree269ae31133de912bba67c95f4d47d5b660c6d6f5
parent84fdc60918c36bdf7f3b76d010011abb2a9b9b25 (diff)
downloadATCD-92bf7a63efcfbf56be7cd33d898c0eea07391103.tar.gz
ChangeLogTag:Mon Jun 7 20:37:27 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r--TAO/ChangeLog-99c17
-rw-r--r--TAO/orbsvcs/tests/Simple_Naming/client.cpp3
-rw-r--r--TAO/orbsvcs/tests/Simple_Naming/client.h2
-rw-r--r--TAO/tao/ORB.cpp17
-rw-r--r--TAO/tao/ORB_Core.cpp9
5 files changed, 35 insertions, 13 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c
index 4162d852fd5..68ee4232aca 100644
--- a/TAO/ChangeLog-99c
+++ b/TAO/ChangeLog-99c
@@ -1,3 +1,20 @@
+Mon Jun 7 20:37:27 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
+
+ * orbsvcs/tests/Simple_Naming/client.h:
+ * orbsvcs/tests/Simple_Naming/client.cpp:
+ The ORB was beign leaked: the TAO_ORB_Manager::orb() method
+ returns a duplicate and that was not getting released in both
+ the MT_Test constructor invocation and in the
+ naming_client.init() call.
+
+ * tao/ORB.cpp:
+ The naming service and other object references should be release
+ *before* releasing the ORB core.
+
+ * tao/ORB_Core.cpp:
+ Made the use of ACE_CString in the ORB_Table explicit, so we
+ understand what is going on.
+
Mon Jun 7 16:13:31 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
* tao/Exception.h:
diff --git a/TAO/orbsvcs/tests/Simple_Naming/client.cpp b/TAO/orbsvcs/tests/Simple_Naming/client.cpp
index ef86e2a6e5f..dd744a52eb3 100644
--- a/TAO/orbsvcs/tests/Simple_Naming/client.cpp
+++ b/TAO/orbsvcs/tests/Simple_Naming/client.cpp
@@ -199,7 +199,8 @@ CosNaming_Client::init (int argc, char **argv)
if (this->parse_args () == -1)
return -1;
- return this->naming_client_.init (this->orbmgr_.orb ());
+ CORBA::ORB_var orb = this->orbmgr_.orb ();
+ return this->naming_client_.init (orb.in ());
}
ACE_CATCHANY
{
diff --git a/TAO/orbsvcs/tests/Simple_Naming/client.h b/TAO/orbsvcs/tests/Simple_Naming/client.h
index e933ab9b4f8..49ae105c80f 100644
--- a/TAO/orbsvcs/tests/Simple_Naming/client.h
+++ b/TAO/orbsvcs/tests/Simple_Naming/client.h
@@ -97,7 +97,7 @@ private:
int size_;
// Number of threads to spawn. By default is set to 10.
- CORBA::ORB_ptr orb_;
+ CORBA::ORB_var orb_;
// A pointer to our ORB.
char* name_service_ior_;
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index c5c9ccb01eb..301ce5ba479 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -150,6 +150,15 @@ CORBA_ORB::CORBA_ORB (TAO_ORB_Core *orb_core)
CORBA_ORB::~CORBA_ORB (void)
{
+ if (!CORBA::is_nil (this->name_service_))
+ CORBA::release (this->name_service_);
+ if (!CORBA::is_nil (this->schedule_service_))
+ CORBA::release (this->schedule_service_);
+ if (!CORBA::is_nil (this->event_service_))
+ CORBA::release (this->event_service_);
+ if (!CORBA::is_nil (this->trading_service_))
+ CORBA::release (this->trading_service_);
+
this->orb_core_->fini ();
ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, tao_mon, *ACE_Static_Object_Lock::instance ()));
@@ -168,14 +177,6 @@ CORBA_ORB::~CORBA_ORB (void)
delete this->shutdown_lock_;
this->shutdown_lock_ = 0;
- if (!CORBA::is_nil (this->name_service_))
- CORBA::release (this->name_service_);
- if (!CORBA::is_nil (this->schedule_service_))
- CORBA::release (this->schedule_service_);
- if (!CORBA::is_nil (this->event_service_))
- CORBA::release (this->event_service_);
- if (!CORBA::is_nil (this->trading_service_))
- CORBA::release (this->trading_service_);
# ifdef TAO_HAS_VALUETYPE
// delete valuetype_factory_map_;
// not really, its a singleton
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 7a637c44276..b0c938e5346 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -1391,21 +1391,24 @@ int
TAO_ORB_Table::bind (const char* orb_id,
TAO_ORB_Core* orb_core)
{
- return this->table_.bind (orb_id, orb_core);
+ ACE_CString id (orb_id);
+ return this->table_.bind (id, orb_core);
}
TAO_ORB_Core*
TAO_ORB_Table::find (const char* orb_id)
{
TAO_ORB_Core* found = 0;
- this->table_.find (orb_id, found);
+ ACE_CString id (orb_id);
+ this->table_.find (id, found);
return found;
}
int
TAO_ORB_Table::unbind (const char* orb_id)
{
- return this->table_.unbind (orb_id);
+ ACE_CString id (orb_id);
+ return this->table_.unbind (id);
}
// ****************************************************************