TClonesArrays deleted correctly
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Apr 2001 08:04:36 +0000 (08:04 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Apr 2001 08:04:36 +0000 (08:04 +0000)
FMD/AliFMD.cxx
FMD/AliFMDSDigitizer.cxx

index 971d8e24e84d43fd3df6fbab52862c798d3d55fd..d66871e01a13cb4e316fa76d2821f4e2743bc241 100644 (file)
@@ -95,9 +95,18 @@ AliFMD::~AliFMD()
   if (fHits) {
       fHits->Delete();
       delete fHits;
+      fHits = 0;
+  }
+  if (fDigits) {
+      fDigits->Delete();
+      delete fDigits;
+      fDigits = 0;
+  }
+  if (fSDigits) {
+      fSDigits->Delete();
+      delete fSDigits;
+      fSDigits = 0;
   }
-  delete fDigits ;
-  delete fSDigits ;
    
 }
 //_____________________________________________________________________________
index 173f1c8bd42233e082764c0eabc7bf0cf354db69..9f9b64d1c8d2fe9458134f0e1154f2b4487a67c5 100644 (file)
@@ -201,7 +201,11 @@ void AliFMDSDigitizer::Exec(Option_t *option) {
     gAlice->TreeS()->Write(0,TObject::kOverwrite) ;
   }
 
-  delete sdigits ;
+  if (sdigits) {
+    sdigits->Delete();
+    delete sdigits ;
+    sdigits = 0;
+  }
   if(file)
     file->Close() ;