summaryrefslogtreecommitdiff
path: root/TAO/tao/ValueFactory.i
blob: 84d4da93833b0cae456a265998563b858c3b4952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// $Id$

ACE_INLINE
CORBA_ValueFactoryBase::CORBA_ValueFactoryBase ()
  : _tao_reference_count_ (1)
{
}

ACE_INLINE void
CORBA_ValueFactoryBase::_add_ref (void)
{
  ACE_GUARD (ACE_SYNCH_MUTEX, guard, this->_tao_reference_count_lock_);
  ++_tao_reference_count_;
}

ACE_INLINE void
CORBA_ValueFactoryBase::_remove_ref (void)
{
  {
    ACE_GUARD (ACE_SYNCH_MUTEX, guard, this->_tao_reference_count_lock_);
    -- this->_tao_reference_count_;
    if (this->_tao_reference_count_ != 0)
      return;
  }
  delete this;
}