From: Mika Laitio Date: Wed, 15 Aug 2012 07:58:07 +0000 (+0300) Subject: memory leak fixes X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=97671ad08a864c833fab1b3827e3d91749c0e9d7;p=libplp.git memory leak fixes Signed-off-by: Mika Laitio --- 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() {