Hi dear team,
I found two locations that calling them results in a memory leak. I can pul request a fix if you wish, but I do not know if it is relevant to the upcoming newlik version.
Location 1:
PhylogeneticApplicationTools.cpp::getSubstitutionModelSet() --> modelSet1 needs to be deleted before exiting the function
Location 2:
SubstitutionModelSet::addModel --> a clone of the model's ParameterList is pushed to the modelParameters_ data member. I am not sure why the clone is needed as the ParameterList holds pointers to the same parameters as in the original list, but maybe I am missing something here.
Please let me know if you would like me to pull request a fix (and specifically if the second fix is as it should be).
Thanks!
Keren