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 31c3e35b4a4599c1a04cf758c6a21d0dd1b04a80..2ff8fdc826648209348c859939616319ea4f7ec5 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;
 }