diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-21 19:21:31 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-21 19:21:31 +0000 |
commit | ce80aa3a26fcaf645d835993a1e8f24e45d6ad9f (patch) | |
tree | 0e1cc2bb3316f4bedfc377ed68c89dc8f3d9afec /TAO/tao/Object.i | |
parent | 11235e05441c26ca63c7784131d3b57d723adb8c (diff) | |
download | ATCD-ce80aa3a26fcaf645d835993a1e8f24e45d6ad9f.tar.gz |
ChangeLogTag:Tue Jul 21 14:19:28 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Object.i')
-rw-r--r-- | TAO/tao/Object.i | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/TAO/tao/Object.i b/TAO/tao/Object.i index db51f7d3b0c..84a18d095ff 100644 --- a/TAO/tao/Object.i +++ b/TAO/tao/Object.i @@ -5,14 +5,20 @@ ACE_INLINE CORBA::ULong CORBA_Object::_incr_refcnt (void) { - return ++this->refcount_; + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, this->refcount_lock_, 0); + return this->refcount_++; } ACE_INLINE CORBA::ULong CORBA_Object::_decr_refcnt (void) { - if (--this->refcount_ != 0) - return this->refcount_; + { + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->refcount_lock_, 0); + this->refcount_--; + if (this->refcount_ != 0) + return this->refcount_; + } + delete this; return 0; } @@ -36,7 +42,7 @@ CORBA_Object::_nil (void) ACE_INLINE CORBA::Boolean CORBA::is_nil (CORBA::Object_ptr obj) { - return (CORBA::Boolean) (obj == 0); + return obj == 0; } ACE_INLINE STUB_Object * |