diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-03-06 07:48:42 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-03-06 07:48:42 +0000 |
commit | 4684fee9fa99b038e0a67b17114e2767cfbec123 (patch) | |
tree | 6a261c0318fc0a21870a20e97d5603c7f1df0109 /TAO/tao/LocalObject.cpp | |
parent | a4754119ce72fab86fd73ed94579c26bd8d1616e (diff) | |
download | ATCD-4684fee9fa99b038e0a67b17114e2767cfbec123.tar.gz |
ChangeLogTag:Tue Mar 5 23:47:17 2002 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/tao/LocalObject.cpp')
-rw-r--r-- | TAO/tao/LocalObject.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/TAO/tao/LocalObject.cpp b/TAO/tao/LocalObject.cpp index 6188a7f0763..a6cfb29fc1d 100644 --- a/TAO/tao/LocalObject.cpp +++ b/TAO/tao/LocalObject.cpp @@ -171,13 +171,22 @@ CORBA_LocalObject::_get_implementation (ACE_ENV_SINGLE_ARG_DECL) void TAO_Local_RefCounted_Object::_add_ref (void) { - this->_incr_refcnt (); + ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->refcount_lock_); + this->refcount_++; } void TAO_Local_RefCounted_Object::_remove_ref (void) { - this->_decr_refcnt (); + { + ACE_GUARD (TAO_SYNCH_MUTEX, mon, this->refcount_lock_); + this->refcount_--; + + if (this->refcount_ != 0) + return; + } + + delete this; } #if (TAO_HAS_CORBA_MESSAGING == 1) |