summaryrefslogtreecommitdiff
path: root/TAO/tao/ORB_Core_Auto_Ptr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/ORB_Core_Auto_Ptr.cpp')
-rw-r--r--TAO/tao/ORB_Core_Auto_Ptr.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/TAO/tao/ORB_Core_Auto_Ptr.cpp b/TAO/tao/ORB_Core_Auto_Ptr.cpp
new file mode 100644
index 00000000000..068897c2c38
--- /dev/null
+++ b/TAO/tao/ORB_Core_Auto_Ptr.cpp
@@ -0,0 +1,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