summaryrefslogtreecommitdiff
path: root/ACE/ace/Service_Object.cpp
diff options
context:
space:
mode:
authorAdam Mitz <mitza@ociweb.com>2015-11-06 17:07:11 -0600
committerAdam Mitz <mitza@ociweb.com>2015-11-06 17:07:11 -0600
commitac5e1702c9f9bee9f1f7bfce8c1a6f3847ea6b4b (patch)
tree0e70d1f51c39e688a05a6cdc2af58408222e4a0d /ACE/ace/Service_Object.cpp
parent5272b5b81f92c298cb998b5bb0b0dbca3e7f29fe (diff)
downloadATCD-ac5e1702c9f9bee9f1f7bfce8c1a6f3847ea6b4b.tar.gz
Merged branch ace-face-safety (FACE Safety Profile import from OCITAO).
Diffstat (limited to 'ACE/ace/Service_Object.cpp')
-rw-r--r--ACE/ace/Service_Object.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/ACE/ace/Service_Object.cpp b/ACE/ace/Service_Object.cpp
index fc01e29b79c..d9e316d3acb 100644
--- a/ACE/ace/Service_Object.cpp
+++ b/ACE/ace/Service_Object.cpp
@@ -1,6 +1,9 @@
#include "ace/config-all.h"
#include "ace/Service_Object.h"
+#if defined (ACE_HAS_ALLOC_HOOKS)
+# include "ace/Malloc_Base.h"
+#endif /* ACE_HAS_ALLOC_HOOKS */
#if !defined (__ACE_INLINE__)
#include "ace/Service_Object.inl"
@@ -32,6 +35,7 @@ ACE_Service_Type::dump (void) const
// initialized yet. Using a "//" prefix, in case the executable
// happens to be a code generator and the output gets embedded in
// the generated C++ code.
+#ifndef ACE_LACKS_STDERR
ACE_OS::fprintf(stderr,
"// [ST] dump, this=%p, name=%s, type=%p, so=%p, active=%d\n",
static_cast<void const *> (this),
@@ -39,7 +43,7 @@ ACE_Service_Type::dump (void) const
static_cast<void const *> (this->type_),
(this->type_ != 0) ? this->type_->object () : 0,
this->active_);
-
+#endif
}
ACE_Service_Type::ACE_Service_Type (const ACE_TCHAR *n,
@@ -75,7 +79,11 @@ ACE_Service_Type::~ACE_Service_Type (void)
ACE_TRACE ("ACE_Service_Type::~ACE_Service_Type");
this->fini ();
+#if defined (ACE_HAS_ALLOC_HOOKS)
+ ACE_Allocator::instance()->free(const_cast <ACE_TCHAR *> (this->name_));
+#else
delete [] const_cast <ACE_TCHAR *> (this->name_);
+#endif /* ACE_HAS_ALLOC_HOOKS */
}
int
@@ -161,7 +169,12 @@ ACE_Service_Type::name (const ACE_TCHAR *n)
{
ACE_TRACE ("ACE_Service_Type::name");
+#if defined (ACE_HAS_ALLOC_HOOKS)
+ ACE_Allocator::instance()->free(const_cast <ACE_TCHAR *> (this->name_));
+#else
delete [] const_cast <ACE_TCHAR *> (this->name_);
+#endif /* ACE_HAS_ALLOC_HOOKS */
+
this->name_ = ACE::strnew (n);
}