diff --git a/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp b/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp index fe3ef5fe0c679..9e25bda661026 100644 --- a/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp +++ b/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp @@ -124,12 +124,11 @@ TAO_IORManip_IIOP_Filter::filter_and_add (TAO_Profile* profile, } else { - TAO_IIOP_Endpoint *endpoint = 0; - ACE_NEW_NORETURN (endpoint, - TAO_IIOP_Endpoint (endpoints[i].host, - endpoints[i].port, - endpoints[i].priority)); - if (endpoint == 0) + TAO_IIOP_Endpoint *endpoint = + new (std::nothrow) TAO_IIOP_Endpoint (endpoints[i].host, + endpoints[i].port, + endpoints[i].priority); + if (!endpoint) { new_profile->_decr_refcnt (); return; diff --git a/TAO/tao/LocateRequest_Invocation.cpp b/TAO/tao/LocateRequest_Invocation.cpp index cd3f4c0f5f9f9..0935edf759d8b 100644 --- a/TAO/tao/LocateRequest_Invocation.cpp +++ b/TAO/tao/LocateRequest_Invocation.cpp @@ -71,9 +71,9 @@ namespace TAO { TAO::ORB_Countdown_Time countdown (max_wait_time); - TAO_Synch_Reply_Dispatcher *rd_p = nullptr; - ACE_NEW_NORETURN (rd_p, TAO_Synch_Reply_Dispatcher (this->resolver_.stub ()->orb_core (), - this->details_.reply_service_info ())); + TAO_Synch_Reply_Dispatcher *rd_p = + new (std::nothrow) TAO_Synch_Reply_Dispatcher (this->resolver_.stub ()->orb_core (), + this->details_.reply_service_info ()); if (!rd_p) { throw ::CORBA::NO_MEMORY (); diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp index 1fdb4a980ec74..fb2dce593cb75 100644 --- a/TAO/tao/Object.cpp +++ b/TAO/tao/Object.cpp @@ -969,10 +969,9 @@ operator>> (TAO_InputCDR& cdr, CORBA::Object*& x) return false; } - ACE_NEW_NORETURN (x, - CORBA::Object (ior, orb_core)); + x = new (std::nothrow) CORBA::Object (ior, orb_core); - if (x == nullptr) + if (!x) { // Can't allocate a CORBA Object so delete first the // memory we already allocated before we return diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp index 9fe06b5a013fd..a04f5be2c2595 100644 --- a/TAO/tao/Synch_Invocation.cpp +++ b/TAO/tao/Synch_Invocation.cpp @@ -90,9 +90,9 @@ namespace TAO { TAO::ORB_Countdown_Time countdown (max_wait_time); - TAO_Synch_Reply_Dispatcher *rd_p = nullptr; - ACE_NEW_NORETURN (rd_p, TAO_Synch_Reply_Dispatcher (this->resolver_.stub ()->orb_core (), - this->details_.reply_service_info ())); + TAO_Synch_Reply_Dispatcher *rd_p = + new (std::nothrow) TAO_Synch_Reply_Dispatcher (this->resolver_.stub ()->orb_core (), + this->details_.reply_service_info ()); if (!rd_p) { throw ::CORBA::NO_MEMORY ();