Deleting array of overlaps
authorrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Jun 2008 13:59:53 +0000 (13:59 +0000)
committerrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Jun 2008 13:59:53 +0000 (13:59 +0000)
STEER/AliGeomManager.cxx

index 31c3e35..2ff8fdc 100644 (file)
@@ -1704,10 +1704,14 @@ Int_t AliGeomManager::CheckOverlapsExtrusions(TGeoNode* start, Double_t threshol
   start->CheckOverlaps(threshold,"s");  
 
   TObjArray* ovexArray = (TObjArray*)gGeoManager->GetListOfOverlaps();
-  AliDebugClass(2,Form("Number of overlaps/extrusions: %d", ovexArray->GetEntriesFast()));
-  
+  Int_t nOvEx = ovexArray->GetEntriesFast();
+  AliDebugClass(2,Form("Number of overlaps/extrusions: %d", nOvEx));
+  if(AliLog::GetDebugLevel("","AliGeomManager")>2) gGeoManager->PrintOverlaps();
+  ovexArray->Delete();
+  delete ovexArray;
+
   gGeoManager->SetCheckingOverlaps(kFALSE);
 
- return ovexArray->GetEntriesFast();
+  return nOvEx;
 }