summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/DLL_Test_Impl.cpp12
-rw-r--r--tests/DLL_Test_Impl.h3
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/DLL_Test_Impl.cpp b/tests/DLL_Test_Impl.cpp
index 87ed155dcc9..fbd6d8a3321 100644
--- a/tests/DLL_Test_Impl.cpp
+++ b/tests/DLL_Test_Impl.cpp
@@ -70,6 +70,16 @@ Hello_Impl::operator new (size_t bytes, const ACE_nothrow_t &nt)
ACE_DEBUG ((LM_INFO, "Hello_Impl::new\n"));
return ::new (nt) char[bytes];
}
+
+#if !defined (ACE_LACKS_PLACEMENT_OPERATOR_DELETE)
+void
+Hello_Impl::operator delete (void *ptr, const ACE_nothrow_t&)
+{
+ ACE_DEBUG ((LM_INFO, "Hello_Impl::delete\n"));
+ ::delete [] static_cast<char *> (ptr);
+}
+#endif /* ACE_LACKS_PLACEMENT_OPERATOR_DELETE */
+
#endif /* ACE_HAS_NEW_NOTHROW */
void
@@ -133,5 +143,5 @@ dynamic_cast_test (Parent *target)
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("dynamic_cast_test: parent %@; child %@\n"),
target, c));
return target == c ? 0 : -1;
-}
+}
#endif /* !ACE_LACKS_RTTI */
diff --git a/tests/DLL_Test_Impl.h b/tests/DLL_Test_Impl.h
index bf16bdd5c48..9ef3fb887a8 100644
--- a/tests/DLL_Test_Impl.h
+++ b/tests/DLL_Test_Impl.h
@@ -56,6 +56,9 @@ public:
#if defined (ACE_HAS_NEW_NOTHROW)
/// Overloaded new operator, nothrow_t variant.
void *operator new (size_t bytes, const ACE_nothrow_t &nt);
+#if !defined (ACE_LACKS_PLACEMENT_OPERATOR_DELETE)
+ void operator delete (void *p, const ACE_nothrow_t&) throw ();
+#endif /* ACE_LACKS_PLACEMENT_OPERATOR_DELETE */
#endif /* ACE_HAS_NEW_NOTHROW */
void operator delete (void *ptr);