From: caremoli Date: Mon, 18 Feb 2008 09:42:04 +0000 (+0000) Subject: CCAR: remove memeory leaks X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b1950410ae7ea27d500dbd89380c43490291c73b;p=modules%2Fkernel.git CCAR: remove memeory leaks --- diff --git a/src/DSC/DSC_Basic/DSC_interface.cxx b/src/DSC/DSC_Basic/DSC_interface.cxx index b32d69bfd..399a62c22 100644 --- a/src/DSC/DSC_Basic/DSC_interface.cxx +++ b/src/DSC/DSC_Basic/DSC_interface.cxx @@ -28,7 +28,13 @@ Engines_DSC_interface::Engines_DSC_interface() {} -Engines_DSC_interface::~Engines_DSC_interface() {} +Engines_DSC_interface::~Engines_DSC_interface() +{ + my_ports_it = my_ports.begin(); + for(;my_ports_it != my_ports.end();my_ports_it++) + delete my_ports_it->second; + +} void Engines_DSC_interface::add_provides_port(Ports::Port_ptr ref, diff --git a/src/DSC/DSC_Basic/DSC_interface.hxx b/src/DSC/DSC_Basic/DSC_interface.hxx index 525843110..5bf5712d2 100644 --- a/src/DSC/DSC_Basic/DSC_interface.hxx +++ b/src/DSC/DSC_Basic/DSC_interface.hxx @@ -164,9 +164,9 @@ protected: std::string repository_id; // Specifique aux provides port; - Ports::Port_ptr provides_port_ref; + Ports::Port_var provides_port_ref; - Ports::PortProperties_ptr port_prop; + Ports::PortProperties_var port_prop; }; typedef std::map ports;