summaryrefslogtreecommitdiff
path: root/ACE/ace/OS_Memory.h
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-06-06 18:08:41 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-06-06 18:08:41 +0200
commit0dc692d9bb9744d921361e655ad8a7d46c1daf16 (patch)
tree1cd37739d264d7e607d9513a6f3431cd7277c201 /ACE/ace/OS_Memory.h
parenta436568e52a5a78afe7b039b4c6b1e089369eba6 (diff)
downloadATCD-0dc692d9bb9744d921361e655ad8a7d46c1daf16.tar.gz
Removed ACE_del_bad_alloc, was only used in when std::nothrow wasn't supported which is now supported by all configurations
* ACE/ace/CORBA_macros.h: * ACE/ace/OS_Memory.h: * ACE/ace/config-win32-msvc.h:
Diffstat (limited to 'ACE/ace/OS_Memory.h')
-rw-r--r--ACE/ace/OS_Memory.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/ACE/ace/OS_Memory.h b/ACE/ace/OS_Memory.h
index 36e17e2c728..d70bddc27aa 100644
--- a/ACE/ace/OS_Memory.h
+++ b/ACE/ace/OS_Memory.h
@@ -69,24 +69,12 @@ ACE_END_VERSIONED_NAMESPACE_DECL
// being used).
// ============================================================================
-// The Windows MFC exception mechanism requires that a caught CException
-// (including the CMemoryException in use here) be freed using its Delete()
-// method. Thus, when MFC is in use and we're catching exceptions as a result
-// of new(), the exception's Delete() method has to be called. No other
-// platform imposes this sort of restriction/requirement. The Windows
-// config stuff (at least for MSVC/MFC) defines a ACE_del_bad_alloc macro
-// that works with its ACE_bad_alloc macro to implement this cleanup
-// requirement. Since no other platform requires this, define it as
-// empty here.
-#if !defined (ACE_del_bad_alloc)
-# define ACE_del_bad_alloc
-#endif
-
// For backwards compatibility, we except all compilers to support these
#include /**/ <new>
#define ACE_bad_alloc std::bad_alloc
#define ACE_nothrow std::nothrow
#define ACE_nothrow_t std::nothrow_t
+#define ACE_del_bad_alloc
// Since new() throws exceptions, we need a way to avoid passing
// exceptions past the call to new because ACE counts on having a 0
@@ -116,7 +104,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#define ACE_NEW_RETURN(POINTER,CONSTRUCTOR,RET_VAL) \
do { POINTER = new (std::nothrow) CONSTRUCTOR; \
- if (POINTER == 0) { errno = ENOMEM; return RET_VAL; } \
+ if (!POINTER == 0) { errno = ENOMEM; return RET_VAL; } \
} while (0)
#define ACE_NEW(POINTER,CONSTRUCTOR) \
do { POINTER = new(std::nothrow) CONSTRUCTOR; \