From 321532e09b0e8454b7fe9d190d1cb7839b28aeb7 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 18 Jul 2005 09:40:29 +0000 Subject: ChangeLogTag: Mon Jul 18 08:43:12 UTC 2005 Johnny Willemsen --- TAO/tao/LocalObject.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'TAO/tao/LocalObject.cpp') 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; } -- cgit v1.2.1