[Rivet-svn] r2627 - trunk/src/Core

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Jul 30 10:01:29 BST 2010


Author: buckley
Date: Fri Jul 30 10:01:28 2010
New Revision: 2627

Log:
Don't leak the transiently-used tree factory

Modified:
   trunk/src/Core/AnalysisHandler.cc

Modified: trunk/src/Core/AnalysisHandler.cc
==============================================================================
--- trunk/src/Core/AnalysisHandler.cc	Fri Jul 30 09:57:39 2010	(r2626)
+++ trunk/src/Core/AnalysisHandler.cc	Fri Jul 30 10:01:28 2010	(r2627)
@@ -230,7 +230,9 @@
       if (!endsWith(filename, ".root")) filename += ".root";
       storetypestr = "root";
     }
-    _theTree = _theAnalysisFactory->createTreeFactory()->create(filename, storetypestr, false, true);
+    AIDA::ITreeFactory* tf = _theAnalysisFactory->createTreeFactory();
+    _theTree = tf->create(filename, storetypestr, false, true);
+    delete tf;
     _theHistogramFactory = _theAnalysisFactory->createHistogramFactory(tree());
     _theDataPointSetFactory = _theAnalysisFactory->createDataPointSetFactory(tree());
   }


More information about the Rivet-svn mailing list