I noticed during a refactoring attempt for Cppcheck's graphical user interface that dynamic memory allocation was used for a XmlReportV2 object within the implementation of the function “ResultsView::readErrorsXml”. This object was not deleted here if a C++ exception would have been thrown during the processing of data from an input file.
Thus put it on the stack so that this source code place is a bit safer and more efficient.
yes it's a good catch. I am waiting for the PR.
This source code adjustment was accepted.
Log in to post a comment.
I noticed during a refactoring attempt for Cppcheck's graphical user interface that dynamic memory allocation was used for a XmlReportV2 object within the implementation of the function “ResultsView::readErrorsXml”.
This object was not deleted here if a C++ exception would have been thrown during the processing of data from an input file.
Thus put it on the stack so that this source code place is a bit safer and more efficient.
yes it's a good catch. I am waiting for the PR.
This source code adjustment was accepted.