Skip to content
Snippets Groups Projects
Commit 0059f2b2 authored by Dave Casper's avatar Dave Casper
Browse files

Prevent memory leak

parent 574e0392
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,12 @@ void TrenchDetectorFactory::create(GeoPhysVol *world) ...@@ -61,7 +61,12 @@ void TrenchDetectorFactory::create(GeoPhysVol *world)
std::string resolvedFile = PathResolver::find_file(gdmlFile, "XMLPATH", PathResolver::RecursiveSearch); std::string resolvedFile = PathResolver::find_file(gdmlFile, "XMLPATH", PathResolver::RecursiveSearch);
XMLHandlerStore::GetHandlerStore()->clear(); auto store = XMLHandlerStore::GetHandlerStore();
for (auto p : *store)
{
delete p.second;
}
store->clear();
GDMLController controller {"TrenchGDMLController"}; GDMLController controller {"TrenchGDMLController"};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment