From: abn Date: Mon, 15 Sep 2014 12:24:16 +0000 (+0200) Subject: Adding explicit ORB destruction function. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0df1ed4f7038391d1afbc3eb445923124684e6f4;p=modules%2Fyacs.git Adding explicit ORB destruction function. --- diff --git a/src/Utils/Utils_ORB_INIT.cxx b/src/Utils/Utils_ORB_INIT.cxx index 84904ea7e..883e4a27a 100644 --- a/src/Utils/Utils_ORB_INIT.cxx +++ b/src/Utils/Utils_ORB_INIT.cxx @@ -54,6 +54,19 @@ ORB_INIT::~ORB_INIT() } } +void ORB_INIT::explicit_destroy() +{ + if ( ! CORBA::is_nil( _orb ) ) + { + try { + _orb->destroy() ; + _orb = CORBA::ORB::_nil(); + } + catch(...) { + MESSAGE("Caught CORBA::Exception."); + } + } +} CORBA::ORB_var &ORB_INIT::operator() ( int argc , char **argv ) throw( CommException ) { diff --git a/src/Utils/Utils_ORB_INIT.hxx b/src/Utils/Utils_ORB_INIT.hxx index 3665ce881..b18b81e01 100644 --- a/src/Utils/Utils_ORB_INIT.hxx +++ b/src/Utils/Utils_ORB_INIT.hxx @@ -56,6 +56,7 @@ private : public : ORB_INIT( void ); virtual ~ORB_INIT(); + void explicit_destroy(); CORBA::ORB_var & operator() ( int argc , char **argv ) throw( CommException ) ; inline CORBA::ORB_var &orb( void );