Skip to content

Commit

Permalink
Fixed the memory leak. Refs #7506.
Browse files Browse the repository at this point in the history
Memory leak is caused by mistakenly using ws.dataX(spectrum), which
causes a copy operatoin on vector, other than ws.readX(spectrum). As it
is not threading safe, the memory leak occurs.
  • Loading branch information
wdzhou committed Jul 29, 2013
1 parent 52bbaab commit 5fd0e17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Algorithms/src/FindPeaks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ namespace Algorithms
const int& i_centre, const int& i_min, const int& i_max,
double& in_bg0, double& in_bg1, double& in_bg2)
{
g_log.information() << "Fitting a peak assumed at " << input->dataX(spectrum)[i_centre]
g_log.information() << "Fitting a peak assumed at " << input->readX(spectrum)[i_centre]
<< " (index = " << i_centre << ") by high-background approach. \n";

// Check
Expand Down

0 comments on commit 5fd0e17

Please sign in to comment.