From 0df1ed4f7038391d1afbc3eb445923124684e6f4 Mon Sep 17 00:00:00 2001 From: abn Date: Mon, 15 Sep 2014 14:24:16 +0200 Subject: [PATCH] Adding explicit ORB destruction function. --- src/Utils/Utils_ORB_INIT.cxx | 13 +++++++++++++ src/Utils/Utils_ORB_INIT.hxx | 1 + 2 files changed, 14 insertions(+) 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 ); -- 2.39.2