diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-07-07 23:58:34 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-07-07 23:58:34 +0000 |
commit | 81e0a245decc09943832d52cb9f419e3f8f355b7 (patch) | |
tree | 8aaf3418082d4c3b107e2f01eedf0d55095c7ec7 /TAO/tao/Cache_Entries.cpp | |
parent | 784fe453b13e068e3ec273b9a0f4021ac5a51e96 (diff) | |
download | ATCD-81e0a245decc09943832d52cb9f419e3f8f355b7.tar.gz |
ChangeLogTag: Mon Jul 07 18:00:38 2003 Irfan Pyarali <irfan@oomworks.com>
Diffstat (limited to 'TAO/tao/Cache_Entries.cpp')
-rw-r--r-- | TAO/tao/Cache_Entries.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/TAO/tao/Cache_Entries.cpp b/TAO/tao/Cache_Entries.cpp index df610a378f6..4e3ed2de940 100644 --- a/TAO/tao/Cache_Entries.cpp +++ b/TAO/tao/Cache_Entries.cpp @@ -11,14 +11,16 @@ ACE_RCSID(tao, Cache_Entries, "$Id$") TAO_Cache_IntId::TAO_Cache_IntId (TAO_Transport *transport) - : transport_ (TAO_Transport::_duplicate (transport)), + : transport_ (transport), recycle_state_ (ACE_RECYCLABLE_UNKNOWN) { + transport->add_reference (); } TAO_Cache_IntId::~TAO_Cache_IntId (void) { - TAO_Transport::release (this->transport_); + if (this->transport_) + this->transport_->remove_reference (); } TAO_Cache_IntId& @@ -28,9 +30,12 @@ TAO_Cache_IntId::operator= (const TAO_Cache_IntId &rhs) { this->recycle_state_ = rhs.recycle_state_; - TAO_Transport* old_transport = this->transport_; - this->transport_ = TAO_Transport::_duplicate (rhs.transport_); - TAO_Transport::release (old_transport); + TAO_Transport *old_transport = this->transport_; + this->transport_ = rhs.transport_; + if (this->transport_) + this->transport_->add_reference (); + if (old_transport) + old_transport->remove_reference (); } return *this; |