]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliQADataMakerRec.cxx
Memory leaks fixed (L.Aphecetche and B.Rabacal)
[u/mrichter/AliRoot.git] / STEER / AliQADataMakerRec.cxx
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)