diff options
author | Steve Huston <shuston@riverace.com> | 2006-11-22 22:02:38 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2006-11-22 22:02:38 +0000 |
commit | 858fcd09203e53d874f6f08e60ac5508c6b3ceeb (patch) | |
tree | 727adde8442af1a0c0c270a537e026fc0caffdd9 /ACE/ace/config-win32-msvc.h | |
parent | e8f35c1c44aff6c73d97f727aea5c7c06f79bbf5 (diff) | |
download | ATCD-858fcd09203e53d874f6f08e60ac5508c6b3ceeb.tar.gz |
ChangeLogTag:Wed Nov 22 21:58:16 UTC 2006 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ACE/ace/config-win32-msvc.h')
-rw-r--r-- | ACE/ace/config-win32-msvc.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ACE/ace/config-win32-msvc.h b/ACE/ace/config-win32-msvc.h index 9b85888b05b..b6758dfa96f 100644 --- a/ACE/ace/config-win32-msvc.h +++ b/ACE/ace/config-win32-msvc.h @@ -65,12 +65,22 @@ # error This version of Microsoft Visual C++ is not supported. #endif -// MFC changes the behavior of operator new at all MSVC versions from 6 up, -// see ace/OS_Memory.h (throws a static CMemoryException* instead of std::bad_alloc) +// MFC changes the behavior of operator new at all MSVC versions from 6 up +// by throwing a static CMemoryException* instead of std::bad_alloc +// (see ace/OS_Memory.h). This MFC exception object needs to be cleaned up +// by calling its Delete() method. #if defined (ACE_HAS_MFC) && (ACE_HAS_MFC == 1) # if !defined (ACE_NEW_THROWS_EXCEPTIONS) # define ACE_NEW_THROWS_EXCEPTIONS # endif +# if defined (ACE_bad_alloc) +# undef ACE_bad_alloc +# endif +# define ACE_bad_alloc CMemoryException *e +# if defined (ACE_del_bad_alloc) +# undef ACE_del_bad_alloc +# endif +# define ACE_del_bad_alloc e->Delete(); #endif /* ACE_HAS_MFC && ACE_HAS_MFC==1 */ #if defined(ACE_MT_SAFE) && (ACE_MT_SAFE != 0) |