]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
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 ab9f281fac3ce25782acc042acaefdca8ff948ec..32afc138da874254dbda39a9327f5a29abff7076 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 6b364ba26c64798f728e7aa9b1a9c3dba483e7de..d5eb83bb8a0c0f4bb63c2d13951422850f694883 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;