]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Memory leaks fixed (L.Aphecetche and B.Rabacal)
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 4 Jul 2011 08:52:59 +0000 (08:52 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 4 Jul 2011 08:52:59 +0000 (08:52 +0000)
STEER/AliQADataMaker.cxx
STEER/AliQADataMakerRec.cxx

index 4d454083711de8f331136623e0c08317a16eb5fd..df2bfafd79cdf0258058b29894962512a16afe96 100644 (file)
@@ -150,7 +150,10 @@ Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray ** list,
       const Char_t * cname = Form("%s_%s", list[AliRecoParam::AConvert(AliRecoParam::kDefault)]->GetName(), hist->GetName()) ;  
       TParameter<double> * p = new TParameter<double>(cname, 9999.9999) ;
       if ( fParameterList[AliRecoParam::AConvert(fEventSpecie)] == NULL )
+      {
         fParameterList[AliRecoParam::AConvert(fEventSpecie)] = new TList() ; 
+        fParameterList[AliRecoParam::AConvert(fEventSpecie)]->SetOwner(kTRUE);
+      }
       fParameterList[AliRecoParam::AConvert(fEventSpecie)]->Add(p) ;
     }
     TObject* old = list[AliRecoParam::AConvert(fEventSpecie)]->At(index);
index 6271302db6be814da2d5ed468f4661cf6c14841c..4d679ab52bc178337bbf9b88369b0a219f498926 100644 (file)
@@ -323,17 +323,19 @@ void AliQADataMakerRec::InitRecoParams()
   if (!fRecoParam) {
     AliDebug(AliQAv1::GetQADebugLevel(), Form("Loading reconstruction parameter objects for detector %s", GetName()));
     AliCDBPath path(GetName(),"Calib","RecoParam");
-    AliCDBEntry *entry=AliCDBManager::Instance()->Get(path.GetPath());
+    AliCDBEntry *entry=AliCDBManager::Instance()->Get(path.GetPath());    
     if(!entry) {
       fRecoParam = NULL ; 
       AliDebug(AliQAv1::GetQADebugLevel(), Form("Couldn't find RecoParam entry in OCDB for detector %s",GetName()));
     }
     else {
+      entry->SetOwner(kTRUE);
       TObject * recoParamObj = entry->GetObject() ; 
       if ( strcmp(recoParamObj->ClassName(), "TObjArray") == 0 ) {
         // The detector has only one set of reco parameters
         AliDebug(AliQAv1::GetQADebugLevel(), Form("Array of reconstruction parameters found for detector %s",GetName()));
         TObjArray *recoParamArray = static_cast<TObjArray*>(recoParamObj) ;
+        recoParamArray->SetOwner(kTRUE);
         for (Int_t iRP=0; iRP<recoParamArray->GetEntriesFast(); iRP++) {
           fRecoParam = static_cast<AliDetectorRecoParam*>(recoParamArray->At(iRP)) ;
           if (!fRecoParam)