]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDsegmentArray.cxx
Fix bug due to shadowed variables
[u/mrichter/AliRoot.git] / TRD / AliTRDsegmentArray.cxx
index e31c4f877b56c942c94ae87845983a45cc601e0b..bbc48a430282e14247959516c503dd6075e392c5 100644 (file)
@@ -21,6 +21,7 @@
 //                                                                        //
 ////////////////////////////////////////////////////////////////////////////
 
+#include <cstdlib>
 #include <TROOT.h>
 #include <TTree.h>
 #include <TClonesArray.h>
@@ -49,7 +50,7 @@ AliTRDsegmentArray::AliTRDsegmentArray()
   ,fClass(0)
 {
   //
-   // Default constructor
+  // Default constructor
   //
 
 }
@@ -110,7 +111,8 @@ AliTRDsegmentArray::~AliTRDsegmentArray()
   // AliTRDsegmentArray destructor
   //
 
-  Delete();
+  // Needed ????
+  //Delete();
 
   if (fNSegment) {
     fSegment->Delete();
@@ -304,7 +306,7 @@ void AliTRDsegmentArray::ClearSegment(Int_t index)
   //
 
   if (fSegment->At(index)) {
-    delete fSegment->RemoveAt(index);
+    fClass->Destructor(fSegment->RemoveAt(index)); 
   }
 
 }