summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2009-11-26 12:56:41 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2009-11-26 12:56:41 +0000
commitd0d83fcd80688ca3482dae931d7cdf642e9db37d (patch)
tree6f36db96b199adb87a38cafab33d7611a175c0ad
parentccb6bb4387e4beb9c8ed097f6afb25a5c7239e4f (diff)
downloadATCD-d0d83fcd80688ca3482dae931d7cdf642e9db37d.tar.gz
Thu Nov 26 12:56:39 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* ciao/Containers/Session/Session_Container.h: Removed not needed forward declaration * ciao/Servants/Servant_Impl_Base.cpp: Keep a reference to the home servant so that it doesn't get deleted when we have a reference to it * ciao/Servants/Servant_Impl_T.cpp: Only print the refcount of the executor when it is > 1, than we have a leak
-rw-r--r--CIAO/ChangeLog13
-rw-r--r--CIAO/ciao/Containers/Session/Session_Container.h1
-rw-r--r--CIAO/ciao/Servants/Servant_Impl_Base.cpp10
-rw-r--r--CIAO/ciao/Servants/Servant_Impl_T.cpp9
4 files changed, 28 insertions, 5 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index f02017d5949..2a7370bfd1e 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,16 @@
+Thu Nov 26 12:56:39 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ciao/Containers/Session/Session_Container.h:
+ Removed not needed forward declaration
+
+ * ciao/Servants/Servant_Impl_Base.cpp:
+ Keep a reference to the home servant so that it doesn't get deleted
+ when we have a reference to it
+
+ * ciao/Servants/Servant_Impl_T.cpp:
+ Only print the refcount of the executor when it is > 1, than we have
+ a leak
+
Thu Nov 26 12:54:39 UTC 2009 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/tests/KeyedWriter/Sender/Writer_Sender_exec.cpp:
diff --git a/CIAO/ciao/Containers/Session/Session_Container.h b/CIAO/ciao/Containers/Session/Session_Container.h
index f3731e3c51a..b61a3d546d7 100644
--- a/CIAO/ciao/Containers/Session/Session_Container.h
+++ b/CIAO/ciao/Containers/Session/Session_Container.h
@@ -31,7 +31,6 @@ namespace CIAO
{
class Session_Container;
class Servant_Activator;
- class Home_Servant_Impl_Base;
namespace Deployment
{
diff --git a/CIAO/ciao/Servants/Servant_Impl_Base.cpp b/CIAO/ciao/Servants/Servant_Impl_Base.cpp
index a7dae80b3d3..ba9c1ab76f1 100644
--- a/CIAO/ciao/Servants/Servant_Impl_Base.cpp
+++ b/CIAO/ciao/Servants/Servant_Impl_Base.cpp
@@ -15,6 +15,10 @@ namespace CIAO
home_servant_ (home_servant),
container_ (Container::_duplicate (c))
{
+ if (home_servant_)
+ {
+ home_servant_->_add_ref ();
+ }
}
Servant_Impl_Base::~Servant_Impl_Base (void)
@@ -113,7 +117,11 @@ namespace CIAO
oid.out ());
if (this->home_servant_)
- this->home_servant_->update_component_map (oid);
+ {
+ this->home_servant_->update_component_map (oid);
+ this->home_servant_->_remove_ref ();
+ this->home_servant_ = 0;
+ }
}
catch (const CORBA::Exception& ex)
{
diff --git a/CIAO/ciao/Servants/Servant_Impl_T.cpp b/CIAO/ciao/Servants/Servant_Impl_T.cpp
index 09b611a4215..4676ef1ebd7 100644
--- a/CIAO/ciao/Servants/Servant_Impl_T.cpp
+++ b/CIAO/ciao/Servants/Servant_Impl_T.cpp
@@ -29,9 +29,12 @@ namespace CIAO
typename CONTEXT>
Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::~Servant_Impl (void)
{
- CIAO_DEBUG ((LM_INFO, "Servant_Impl_T::~Servant_Impl - "
- "Executor object reference count is %u\n",
- this->executor_->_refcount_value ()));
+ if (this->executor_->_refcount_value () > 1)
+ {
+ CIAO_DEBUG ((LM_INFO, "Servant_Impl_T::~Servant_Impl - "
+ "Executor object reference count is %u\n",
+ this->executor_->_refcount_value ()));
+ }
this->context_->_remove_ref ();
}