From b1950410ae7ea27d500dbd89380c43490291c73b Mon Sep 17 00:00:00 2001 From: caremoli Date: Mon, 18 Feb 2008 09:42:04 +0000 Subject: [PATCH] CCAR: remove memeory leaks --- src/DSC/DSC_Basic/DSC_interface.cxx | 8 +++++++- src/DSC/DSC_Basic/DSC_interface.hxx | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) 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; -- 2.39.2