Dear members of the root support,
In the code we develop, we have to call many times TMVA::Reader. It’s appear that a huge memory leak happend due to an undeleted map (fMethodMap) in the destructor (TMVA::~Reader). This memory leak causing my OS (Ubuntu 12.04) to freeze I had to track the leak and finally I propose this solution :
in file $ROOTSYS/tmva/src/Reader.cxx
[code]TMVA::Reader::~Reader( void )
{
// destructor
delete fDataSetManager; // DSMTEST
delete fLogger;
std::map<TString, IMethod* >::iterator it_del;
for( it_del = fMethodMap.begin(); it_del != fMethodMap.end(); it_del++)
{
delete (*it_del).second;
(*it_del).second = 0;
}
fMethodMap.clear();
}[/code]
Will you envisage to correct this bug in a futur release ?
Thank you for your consideration
Best regards
PS : my root environment :
“TMVA Release” value=“4.1.4
"ROOT Release” value="5.34/10