summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-03 14:19:47 +0000
committersma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-03 14:19:47 +0000
commitee48f3f0066db77eb6521b49f8232167c7e588b3 (patch)
tree440c98cb217959c9654bfb2ba0d03b157d848df3
parent74eb5a1c246416563124ea2a4a76192b4722c717 (diff)
downloadATCD-ee48f3f0066db77eb6521b49f8232167c7e588b3.tar.gz
ChangeLogTag: Wed Jan 03 14:20:00 UTC 2007 Simon Massey <sma@prismtech.com>
-rw-r--r--ACE/ACEXML/ChangeLog5
-rw-r--r--ACE/ACEXML/common/XML_Macros.h15
-rw-r--r--ACE/ChangeLog5
-rw-r--r--ACE/ace/CORBA_macros.h15
4 files changed, 38 insertions, 2 deletions
diff --git a/ACE/ACEXML/ChangeLog b/ACE/ACEXML/ChangeLog
index 2047d310a51..a75cf4f65a1 100644
--- a/ACE/ACEXML/ChangeLog
+++ b/ACE/ACEXML/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jan 03 14:20:00 UTC 2007 Simon Massey <sma@prismtech.com>
+
+ * common/XML_Macros.h:
+ With MFC, must delete any caught and eaten "out of memory" exceptions.
+
Fri Oct 28 02:29:57 UTC 2006 Ossama Othman <ossama_othman at symantec dot com>
From Russell Mora <russell_mora at symantec dot com>
diff --git a/ACE/ACEXML/common/XML_Macros.h b/ACE/ACEXML/common/XML_Macros.h
index 50ec6857b3a..36a5f37ccbf 100644
--- a/ACE/ACEXML/common/XML_Macros.h
+++ b/ACE/ACEXML/common/XML_Macros.h
@@ -36,6 +36,19 @@
// in/out of each function that can throw an exception. The type of the
// environment variable is defined by ACEXML_ENV_TYPE.
+// 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
+
#if !defined (ACEXML_ENV_TYPE)
# define ACEXML_ENV_TYPE ACEXML_Env
#endif /* ACEXML_ENV_TYPE */
@@ -331,7 +344,7 @@
# define ACEXML_NEW_THROW_EX(POINTER,CONSTRUCTOR,EXCEPTION) \
do { try { POINTER = new CONSTRUCTOR; } \
- catch (ACE_bad_alloc) { errno = ENOMEM; ACEXML_THROW_R_INT (EXCEPTION); } \
+ catch (ACE_bad_alloc) { ACE_del_bad_alloc errno = ENOMEM; ACEXML_THROW_R_INT (EXCEPTION); } \
} while (0)
#else /* ! ACE_NEW_THROWS_EXCEPTIONS */
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 076f56d77a3..ee0289ae755 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jan 03 14:20:00 UTC 2007 Simon Massey <sma@prismtech.com>
+
+ * ace/CORBA_macros.h:
+ With MFC, must delete any caught and eaten "out of memory" exceptions.
+
Wed Jan 3 13:25:06 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
* bin/msvc_static_order.lst:
diff --git a/ACE/ace/CORBA_macros.h b/ACE/ace/CORBA_macros.h
index 8b36ec2f0a0..4a7a3c44bf0 100644
--- a/ACE/ace/CORBA_macros.h
+++ b/ACE/ace/CORBA_macros.h
@@ -34,6 +34,19 @@
#include "ace/Exception_Macros.h"
+// 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
+
// If you wish to you use these macros for emulating exceptions on
// platforms which lack native exception support, you need to do the
// following:
@@ -407,7 +420,7 @@
# define ACE_NEW_THROW_EX(POINTER,CONSTRUCTOR,EXCEPTION) \
do { try { POINTER = new CONSTRUCTOR; } \
- catch (ACE_bad_alloc) { errno = ENOMEM; ACE_THROW_INT (EXCEPTION); } \
+ catch (ACE_bad_alloc) { ACE_del_bad_alloc errno = ENOMEM; ACE_THROW_INT (EXCEPTION); } \
} while (0)
#else /* ! ACE_NEW_THROWS_EXCEPTIONS */