]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- Unload Digits and RecPoints after reading
authorppillot <ppillot@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 28 Mar 2010 14:21:17 +0000 (14:21 +0000)
committerppillot <ppillot@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 28 Mar 2010 14:21:17 +0000 (14:21 +0000)
- Fix memory leak

EVE/alice-macros/muon_clusters.C
EVE/alice-macros/muon_digits.C

index 3e05791e8c706b6d47bf0a5e23b6cf9b0dad54aa..cf3e366941b85b8be72723c3cba9a7b9b15ba4e7 100644 (file)
@@ -57,7 +57,12 @@ void muon_clusters()
   clusterStore->Clear();
   clusterStore->Connect(*ct,kFALSE);
   ct->GetEvent(0);
-  if (clusterStore->GetSize() == 0 && !gEve->GetKeepEmptyCont()) return;
+  rl->UnloadRecPoints("MUON");
+  
+  if (clusterStore->GetSize() == 0 && !gEve->GetKeepEmptyCont()) {
+    delete clusterStore;
+    return;
+  }
   
   // cluster container
   TEvePointSet* clusterList = new TEvePointSet(10000);
index c5dfc42703efeb0dcdea20744530c523a2d82f64..842db1454088dab7f9ae9d488bda7ab1bb318b25 100644 (file)
@@ -106,7 +106,12 @@ void muon_digits()
   digitStore->Clear();
   digitStore->Connect(*dt,0);
   dt->GetEvent(0);
-  if (digitStore->GetSize() == 0 && !gEve->GetKeepEmptyCont()) return;
+  rl->UnloadDigits("MUON");
+  
+  if (digitStore->GetSize() == 0 && !gEve->GetKeepEmptyCont()) {
+    delete digitStore;
+    return;
+  }
   
   // container for graphic representation of digits
   TEveElementList* cont = new TEveElementList("MUON Digits");