STEER/CDB: Missing delete in AliDCSSensor dtor
authorhbeck <hbeck@ikf.uni-frankfurt.de>
Tue, 17 Feb 2015 17:58:05 +0000 (18:58 +0100)
committeragrigora <alina.grigoras@cern.ch>
Wed, 18 Feb 2015 07:55:44 +0000 (08:55 +0100)
AliDCSSensor is missing to delete its data member fGraph in its dtor
causing SHUTTLE to memory leak (ALIROOT-5826)

STEER/CDB/AliDCSSensor.cxx
STEER/CDB/AliDCSSensor.h

index ebfedf7..2d32ac0 100644 (file)
@@ -69,6 +69,16 @@ AliDCSSensor::AliDCSSensor(const AliDCSSensor& source) :
    if (source.fFit) fFit = (AliSplineFit*)source.fFit->Clone();
 }
 
+AliDCSSensor::~AliDCSSensor(){
+  //
+  // Destructor
+  //
+  if(fGraph)
+    delete fGraph;
+  fGraph=0;
+
+}
+
 AliDCSSensor& AliDCSSensor::operator=(const AliDCSSensor& source){
 //
 // assignment operator
index 5ba32db..a3207db 100644 (file)
@@ -33,7 +33,7 @@ class AliDCSSensor : public TNamed {
 public:
   AliDCSSensor();
   AliDCSSensor(const AliDCSSensor& source);
-  virtual ~AliDCSSensor(){}
+  virtual ~AliDCSSensor();
   AliDCSSensor& operator=(const AliDCSSensor& source);
   virtual void Print(const Option_t* option="") const;
   virtual void Draw(Option_t* option="") ;