summaryrefslogtreecommitdiff
path: root/TAO/tao/AnyTypeCode/True_RefCount_Policy.inl
blob: 87b1b1b91599f8ee011f58e31a7e138c4c85a5d7 (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
// -*- C++ -*-
//
// $Id$


ACE_INLINE
TAO::True_RefCount_Policy::True_RefCount_Policy (void)
  : refcount_ (1)
{
}

ACE_INLINE void
TAO::True_RefCount_Policy::add_ref (void)
{
  ++this->refcount_;
}

ACE_INLINE void
TAO::True_RefCount_Policy::remove_ref (void)
{
  const unsigned long new_count = --this->refcount_;

  if (new_count == 0)
    delete this;
}