]> SALOME platform Git repositories - modules/yacs.git/commitdiff
Salome HOME
Adding explicit ORB destruction function.
authorabn <adrien.bruneton@cea.fr>
Mon, 15 Sep 2014 12:24:16 +0000 (14:24 +0200)
committerabn <adrien.bruneton@cea.fr>
Mon, 15 Sep 2014 12:24:16 +0000 (14:24 +0200)
src/Utils/Utils_ORB_INIT.cxx
src/Utils/Utils_ORB_INIT.hxx

index 84904ea7e4ea5174c024f5973f0f9c47219efc29..883e4a27af37991d32719a9ad2cf957301068a68 100644 (file)
@@ -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 )
 {
index 3665ce881a32952285f5ffadf8c8486799a62163..b18b81e01b1316610a706c84c45b76b6be52245d 100644 (file)
@@ -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 );