summaryrefslogtreecommitdiff
path: root/ACE/ace/Cleanup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/Cleanup.cpp')
-rw-r--r--ACE/ace/Cleanup.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/ACE/ace/Cleanup.cpp b/ACE/ace/Cleanup.cpp
index d83022c858b..0e162c8cf3b 100644
--- a/ACE/ace/Cleanup.cpp
+++ b/ACE/ace/Cleanup.cpp
@@ -8,6 +8,10 @@
#include "ace/OS_NS_string.h"
#include "ace/os_include/os_typeinfo.h"
+#if defined (ACE_HAS_ALLOC_HOOKS)
+# include "ace/Malloc_Base.h"
+#endif /* ACE_HAS_ALLOC_HOOKS */
+
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
void
@@ -52,9 +56,15 @@ ACE_Cleanup_Info_Node::ACE_Cleanup_Info_Node (void *object,
ACE_Cleanup_Info_Node::~ACE_Cleanup_Info_Node (void)
{
if (this->name_)
+#if defined (ACE_HAS_ALLOC_HOOKS)
+ ACE_Allocator::instance()->free ((void *) name_);
+#else
ACE_OS::free ((void *) name_);
+#endif /* ACE_HAS_ALLOC_HOOKS */
}
+ACE_ALLOC_HOOK_DEFINE(ACE_Cleanup_Info_Node)
+
bool
ACE_Cleanup_Info_Node::operator== (const ACE_Cleanup_Info_Node &o) const
{