diff options
Diffstat (limited to 'TAO/tao/Synch_Invocation.cpp')
-rw-r--r-- | TAO/tao/Synch_Invocation.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp index 5cc60f9ad17..4b7563ec7a6 100644 --- a/TAO/tao/Synch_Invocation.cpp +++ b/TAO/tao/Synch_Invocation.cpp @@ -585,7 +585,11 @@ namespace TAO // We must manage the memory allocated // by the call above to alloc(). +#if defined (ACE_HAS_CPP11) + std::unique_ptr<CORBA::Exception> safety (exception); +#else auto_ptr<CORBA::Exception> safety (exception); +#endif /* ACE_HAS_CPP11 */ exception->_raise (); @@ -732,7 +736,11 @@ namespace TAO // Without this, the call to create_system_exception() above // causes a memory leak. On platforms without native exceptions, // the CORBA::Environment class manages the memory. +#if defined (ACE_HAS_CPP11) + std::unique_ptr<CORBA::SystemException> safety (ex); +#else auto_ptr<CORBA::SystemException> safety (ex); +#endif /* ACE_HAS_CPP11 */ ex->minor (minor); ex->completed (CORBA::CompletionStatus (completion)); |