From 97671ad08a864c833fab1b3827e3d91749c0e9d7 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Wed, 15 Aug 2012 10:58:07 +0300 Subject: [PATCH] memory leak fixes Signed-off-by: Mika Laitio --- src/Data.cc | 4 +++- src/DeviceData.cc | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Data.cc b/src/Data.cc index 7336eaf..69c2c0f 100644 --- a/src/Data.cc +++ b/src/Data.cc @@ -34,7 +34,9 @@ Data::Data(int size) { value_arr.resize(size); } -Data::Data(int size, double default_value, string unit_param) { +Data::Data(int size, + double default_value, + string unit_param) { int ii; value_arr.resize(size); diff --git a/src/DeviceData.cc b/src/DeviceData.cc index 55bf71d..9deed93 100644 --- a/src/DeviceData.cc +++ b/src/DeviceData.cc @@ -25,6 +25,7 @@ DeviceData::DeviceData(string id_param, } DeviceData::~DeviceData() { + delete(_latest_data); } void DeviceData::printout() { -- 2.41.1