summaryrefslogtreecommitdiff
path: root/trunk/TAO/tao/ORB_Core_Auto_Ptr.cpp
blob: 068897c2c383a11d0f9d8a985b02db2e909a19d1 (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
27
28
29
30
31
32
33
#include "tao/ORB_Core_Auto_Ptr.h"
#include "tao/ORB_Core.h"

#if !defined (__ACE_INLINE__)
# include "tao/ORB_Core_Auto_Ptr.inl"
#endif  /* !__ACE_INLINE */

ACE_RCSID (tao,
           ORB_Core_Auto_Ptr,
           "$Id$")

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

TAO_ORB_Core_Auto_Ptr::~TAO_ORB_Core_Auto_Ptr (void)
{
  if (this->get () != 0)
    {
      this->get ()->_decr_refcnt ();
    }
}

void
TAO_ORB_Core_Auto_Ptr::reset (TAO_ORB_Core *p)
{
  if (this->get () != p && this->get () != 0)
    {
      this->get ()->_decr_refcnt ();
    }

  this->p_ = p;
}

TAO_END_VERSIONED_NAMESPACE_DECL