1 #include "tao/Refcounted_ObjectKey.h"
3 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
7 TAO::ObjectKey_Table::bind (const TAO::ObjectKey &key,
8 TAO::Refcounted_ObjectKey *&key_new)
16 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
21 // This is a tradeoff.. We could avoid this two stage process of
22 // using a find () and then a bind () , which would make things
23 // efficient. BUT we may have to do allocation upfront and delete if
24 // bind () returns with an entry. We take one of the routes that
26 retval = this->table_.find (key, key_new);
30 return this->bind_i (key, key_new);
33 (void) key_new->incr_refcount ();
41 TAO::ObjectKey_Table::unbind (TAO::Refcounted_ObjectKey *&key_new)
44 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
49 // If the refcount has dropped to 1, just go ahead and unbind it
51 if (key_new && key_new->decr_refcount () == 1)
53 return this->unbind_i (key_new);
59 TAO_END_VERSIONED_NAMESPACE_DECL