]> pilppa.com Git - libplp.git/commitdiff
memory leak fixes
authorMika Laitio <lamikr@pilppa.org>
Wed, 15 Aug 2012 07:58:07 +0000 (10:58 +0300)
committerMika Laitio <lamikr@pilppa.org>
Wed, 15 Aug 2012 07:58:07 +0000 (10:58 +0300)
Signed-off-by: Mika Laitio <lamikr@pilppa.org>
src/Data.cc
src/DeviceData.cc

index 7336eaf188dc561bf5f638f2ceeca5b010744f48..69c2c0fbf128ba2af10a177f6e36bb7b63499215 100644 (file)
@@ -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);
index 55bf71dd0ad0f1f459759a3dd1d0f83ebc75a37e..9deed93682a228abee52a6c5831bc72e7eca8d92 100644 (file)
@@ -25,6 +25,7 @@ DeviceData::DeviceData(string id_param,
 }
 
 DeviceData::~DeviceData() {
+       delete(_latest_data);
 }
 
 void DeviceData::printout() {