From cef7a4cc18ecfb01c0a9c47ba3e61a9acf2ce0a2 Mon Sep 17 00:00:00 2001 From: gconesab Date: Sat, 28 Aug 2010 12:06:27 +0000 Subject: [PATCH] Clear the hits array before deleting --- EMCAL/AliEMCALv1.cxx | 14 +++++++------- EMCAL/AliEMCALv2.cxx | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/EMCAL/AliEMCALv1.cxx b/EMCAL/AliEMCALv1.cxx index 7b2be756b7f..f800fe0dc50 100644 --- a/EMCAL/AliEMCALv1.cxx +++ b/EMCAL/AliEMCALv1.cxx @@ -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; + } } //______________________________________________________________________ diff --git a/EMCAL/AliEMCALv2.cxx b/EMCAL/AliEMCALv2.cxx index 3ac18a64dd9..f98240e3c6a 100644 --- a/EMCAL/AliEMCALv2.cxx +++ b/EMCAL/AliEMCALv2.cxx @@ -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; + } } //______________________________________________________________________ -- 2.43.0