summaryrefslogtreecommitdiff
path: root/TAO/tao/LocalObject.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2005-07-18 09:40:29 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2005-07-18 09:40:29 +0000
commit321532e09b0e8454b7fe9d190d1cb7839b28aeb7 (patch)
treee56b79246b2ff9b36ef8cb1a9dd355c952a7690e /TAO/tao/LocalObject.cpp
parent396a36b2460ee4c592b460c8f62b932ee0fa3865 (diff)
downloadATCD-321532e09b0e8454b7fe9d190d1cb7839b28aeb7.tar.gz
ChangeLogTag: Mon Jul 18 08:43:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao/LocalObject.cpp')
-rw-r--r--TAO/tao/LocalObject.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/TAO/tao/LocalObject.cpp b/TAO/tao/LocalObject.cpp
index 9185a471c69..2295556f9ed 100644
--- a/TAO/tao/LocalObject.cpp
+++ b/TAO/tao/LocalObject.cpp
@@ -215,21 +215,15 @@ CORBA::LocalObject::_get_orb (ACE_ENV_SINGLE_ARG_DECL)
void
TAO_Local_RefCounted_Object::_add_ref (void)
{
- ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->refcount_lock_);
++this->refcount_;
}
void
TAO_Local_RefCounted_Object::_remove_ref (void)
{
- {
- ACE_GUARD (TAO_SYNCH_MUTEX, mon, this->refcount_lock_);
- --this->refcount_;
+ const CORBA::ULong new_count = --this->refcount_;
- if (this->refcount_ != 0)
- return;
- }
-
- delete this;
+ if (new_count == 0)
+ delete this;
}