Fixed TObjArrays ownerships to prevent mem.leaks (noticed by S.Rossegger)
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Aug 2010 09:46:09 +0000 (09:46 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Aug 2010 09:46:09 +0000 (09:46 +0000)
STEER/AliCheb3D.cxx
STEER/AliMagWrapCheb.cxx

index ab9f281..32afc13 100644 (file)
@@ -272,6 +272,7 @@ void AliCheb3D::Clear(const Option_t*)
   if (fResTmp)        { delete[] fResTmp; fResTmp = 0; }
   if (fGrid)          { delete[] fGrid;   fGrid   = 0; }
   if (fUsrMacro)      { delete fUsrMacro; fUsrMacro = 0;}
+  fChebCalc.SetOwner(kTRUE);
   fChebCalc.Delete();
   //
 }
index 6b364ba..d5eb83b 100644 (file)
@@ -172,6 +172,7 @@ void AliMagWrapCheb::Clear(const Option_t *)
 {
   // clear all dynamic parts
   if (fNParamsSol) {
+    fParamsSol->SetOwner(kTRUE);
     delete   fParamsSol;  fParamsSol = 0;
     delete[] fSegZSol;    fSegZSol   = 0;
     delete[] fSegPSol;    fSegPSol   = 0;
@@ -188,6 +189,7 @@ void AliMagWrapCheb::Clear(const Option_t *)
   fMaxRSol = 0;
   //
   if (fNParamsTPC) {
+    fParamsTPC->SetOwner(kTRUE);
     delete   fParamsTPC;  fParamsTPC = 0;
     delete[] fSegZTPC;    fSegZTPC   = 0;
     delete[] fSegPTPC;    fSegPTPC   = 0;
@@ -204,6 +206,7 @@ void AliMagWrapCheb::Clear(const Option_t *)
   fMaxRTPC = 0;
   //
   if (fNParamsTPCRat) {
+    fParamsTPCRat->SetOwner(kTRUE);
     delete   fParamsTPCRat;  fParamsTPCRat = 0;
     delete[] fSegZTPCRat;    fSegZTPCRat   = 0;
     delete[] fSegPTPCRat;    fSegPTPCRat   = 0;
@@ -220,6 +223,7 @@ void AliMagWrapCheb::Clear(const Option_t *)
   fMaxRTPCRat = 0;
   //
   if (fNParamsDip) {
+    fParamsDip->SetOwner(kTRUE);
     delete   fParamsDip;  fParamsDip = 0;
     delete[] fSegZDip;    fSegZDip   = 0;
     delete[] fSegYDip;    fSegYDip   = 0;