]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITS.cxx
Corrections in the destructors
[u/mrichter/AliRoot.git] / ITS / AliITS.cxx
index 04368ce4a32c1d3198dbd4bda2801013228614eb..334c77f434a88cdf2ccccacb0b31ea9261bc6451 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.76  2002/11/21 23:05:27  alibrary
+Removing AliMC and AliMCProcess
+
 Revision 1.75  2002/10/22 14:45:25  alibrary
 Introducing Riostream.h
 
@@ -455,36 +458,49 @@ AliITS::~AliITS(){
     // Return:
     //      none.
 
-    delete fHits; fHits=0;
-    delete fSDigits; fSDigits=0;
+  if (fHits) {
+    fHits->Delete();
+    delete fHits;
+    fHits=0;
+  }
+  if (fSDigits) {
+    fSDigits->Delete();
+    delete fSDigits;
+    fSDigits=0;
+  }
 //    delete fDigits; fDigits=0;
-    delete fRecPoints; fRecPoints=0;
-    if(fIdName!=0) delete[] fIdName;  // Array of TStrings
-    if(fIdSens!=0) delete[] fIdSens;
-    if(fITSmodules!=0) {
+  if (fRecPoints) {
+    fRecPoints->Delete();
+    delete fRecPoints;
+    fRecPoints=0;
+  }
+  delete[] fIdName;  // Array of TStrings
+  delete[] fIdSens;
+  if(fITSmodules) {
        this->ClearModules();
        delete fITSmodules;
-    }// end if fITSmodules!=0
-
-    if(fDtype) {
-       fDtype->Delete();
-       delete fDtype;
-    } // end if fDtype
-    delete [] fNdtype;
-    if (fCtype) {
-       fCtype->Delete();
-       delete fCtype;
-    } // end if fCtype
-    delete [] fNctype;
-
-    if (fDetTypes) {
-       fDetTypes->Delete();
-       delete fDetTypes;
-    } // end if fDetTypes
-
-    if (fTreeC) delete fTreeC;
-
-    if (fITSgeom) delete fITSgeom;
+       fITSmodules = 0;
+  }// end if fITSmodules!=0
+
+  if(fDtype) {
+    fDtype->Delete();
+    delete fDtype;
+  } // end if fDtype
+  delete [] fNdtype;
+  if (fCtype) {
+    fCtype->Delete();
+    delete fCtype;
+  } // end if fCtype
+  delete [] fNctype;
+
+  if (fDetTypes) {
+    fDetTypes->Delete();
+    delete fDetTypes;
+  } // end if fDetTypes
+
+  if (fTreeC) delete fTreeC;
+
+  if (fITSgeom) delete fITSgeom;
 }
 //______________________________________________________________________
 AliITS::AliITS(AliITS &source){