From: ribes Date: Wed, 25 Mar 2009 15:03:59 +0000 (+0000) Subject: - Correction lors de la destruction des ports DSC parallèle X-Git-Tag: new_launcher_alpha_091119~39 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f663defae94e1e4526a82f9b7d4a89a1f6778a0f;p=modules%2Fkernel.git - Correction lors de la destruction des ports DSC parallèle - On fait _remove_ref et c'est le poa qui les détruit à la fin --- diff --git a/src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx b/src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx index 2ea3c6637..25009cbf1 100644 --- a/src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx +++ b/src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx @@ -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(); } diff --git a/src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx b/src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx index e4f2b72f1..960445e9e 100644 --- a/src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx +++ b/src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx @@ -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 diff --git a/src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx b/src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx index 48bbe04e1..fa2e725d7 100644 --- a/src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx +++ b/src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx @@ -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 diff --git a/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx b/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx index 10139688a..0c7d319a6 100644 --- a/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx @@ -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 - "<