From: gconesab Date: Sat, 28 Aug 2010 12:06:27 +0000 (+0000) Subject: Clear the hits array before deleting X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=cef7a4cc18ecfb01c0a9c47ba3e61a9acf2ce0a2 Clear the hits array before deleting --- 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; + } } //______________________________________________________________________