Salome HOME
Adding explicit ORB destruction function.
[modules/kernel.git] / src / Utils / Utils_ORB_INIT.cxx
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 )
 {