]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
- Correction lors de la destruction des ports DSC parallèle
authorribes <ribes>
Wed, 25 Mar 2009 15:03:59 +0000 (15:03 +0000)
committerribes <ribes>
Wed, 25 Mar 2009 15:03:59 +0000 (15:03 +0000)
  - On fait _remove_ref et c'est le poa qui les détruit Ã  la fin

src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx
src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx
src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx
src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx

index 2ea3c66373d81aaf899ad0b4d63896b97928c812..25009cbf1765776308d2a2c4f1b934c18a7040ee 100644 (file)
@@ -173,6 +173,7 @@ Param_Double_Port_provides_i::init_port(Engines_ParallelDSC_i * par_compo,
     if (i == rank) {
       std::cerr << "Adding node of processor : " << i << std::endl;
       par_compo->add_parallel_provides_node_port(Ports::Port_PaCO::_narrow(port->_this()), port_name.c_str());
+      port->_remove_ref();
     }
     com->paco_barrier();
   }
index e4f2b72f13ae2f86d97f3b5f9ea132378ae6b2d3..960445e9ef8e048ad6dddd817dd83020902cad46 100644 (file)
@@ -28,6 +28,9 @@ Param_Double_Port_uses_i::Param_Double_Port_uses_i(Engines_ParallelDSC_i * par_c
 {
   _orb = CORBA::ORB::_duplicate(orb);
   _fake_properties = new PortProperties_i();
+  _fake_prop_ref = _fake_properties->_this();
+  _fake_properties->_remove_ref();
+
   _par_compo = par_compo;
   _port_name = port_name;
   _provides_port = NULL;
@@ -40,8 +43,6 @@ Param_Double_Port_uses_i::Param_Double_Port_uses_i(Engines_ParallelDSC_i * par_c
 
 Param_Double_Port_uses_i::~Param_Double_Port_uses_i()
 {
-  if (_fake_properties)
-    delete _fake_properties;
   if (_provides_port)
   {
     _provides_port->stop();
@@ -54,7 +55,7 @@ Param_Double_Port_uses_i::add_port_to_component()
 {
     _par_compo->add_uses_port("IDL:Ports/Param_Double_Port:1.0", 
                              _port_name.c_str(),
-                             _fake_properties->_this());
+                             _fake_prop_ref);
 }
 
 void
index 48bbe04e13181691af38e1a7c1ed9d59e1232e8e..fa2e725d73d98b8c7614240d669a30d1a47ba392 100644 (file)
@@ -55,7 +55,7 @@ class Param_Double_Port_uses_i
     Engines_ParallelDSC_i * _par_compo;
     Ports::Param_Double_Port_var _proxy_port;
     PortProperties_i *  _fake_properties;
-
+    Ports::PortProperties_var _fake_prop_ref;
     Ports::PaCO_Param_Double_Port * _provides_port;
 };
 #endif
index 10139688a1dcf92b40f860443908da656d09c1da..0c7d319a6008901c67994a715febe79af881dc83 100644 (file)
@@ -206,6 +206,13 @@ int main(int argc, char* argv[])
   {
     INFOS("Caught CORBA::Exception.");
   }
+  catch(omniORB::fatalException& fe) 
+  {
+    INFOS("Caught omniORB::fatalException:");
+    INFOS(" file: " << fe.file());
+    INFOS(" line: " << fe.line());
+    INFOS(" mesg: " << fe.errmsg());
+  }
   catch(std::exception& exc)
   {
     INFOS("Caught std::exception - "<<exc.what());