]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Clear the hits array before deleting
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 28 Aug 2010 12:06:27 +0000 (12:06 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 28 Aug 2010 12:06:27 +0000 (12:06 +0000)
EMCAL/AliEMCALv1.cxx
EMCAL/AliEMCALv2.cxx

index 7b2be756b7f85c688b985a060ac649bf8efee21d..f800fe0dc50bb4a465400ccba289f8f1d2f06efa 100644 (file)
@@ -77,13 +77,13 @@ AliEMCALv1::AliEMCALv1(const char *name, const char *title)
 
 //______________________________________________________________________
 AliEMCALv1::~AliEMCALv1(){
-    // dtor
-
-    if ( fHits) {
-       fHits->Delete();
-       delete fHits;
-       fHits = 0;
-    }
+  // dtor
+  
+  if ( fHits ) {
+    fHits->Clear();
+    delete fHits;
+    fHits = 0;
+  }
 }
 
 //______________________________________________________________________
index 3ac18a64dd9f5f4a67eaabdb602f2a632d4b6e41..f98240e3c6a29b8801aa5d92d0346a7d811d0cb3 100644 (file)
@@ -76,11 +76,11 @@ AliEMCALv2::AliEMCALv2(const char *name, const char *title)
 AliEMCALv2::~AliEMCALv2(){
     // dtor
 
-    if ( fHits) {
-       fHits->Delete();
-       delete fHits;
-       fHits = 0;
-    }
+  if ( fHits ) {
+    fHits->Clear();
+    delete fHits;
+    fHits = 0;
+  }
 }
 
 //______________________________________________________________________