diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2011-11-11 15:40:59 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2011-11-11 15:40:59 +0400 |
commit | c2121695c2a7be7538745759f2f86ec280baa54d (patch) | |
tree | e1e30e8a573890f8c380e6c49f7ada43c7359148 /mert/evaluator.cpp | |
parent | 85d39d7d428a2ae1fbf4ee08c1146181b87b5d9d (diff) |
Fix memory leaks in mert.
Diffstat (limited to 'mert/evaluator.cpp')
-rw-r--r-- | mert/evaluator.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mert/evaluator.cpp b/mert/evaluator.cpp index f766fb19f..e4625382e 100644 --- a/mert/evaluator.cpp +++ b/mert/evaluator.cpp @@ -110,13 +110,12 @@ int main(int argc, char** argv) if (candidate.length() == 0) throw runtime_error("You have to specify at least one candidate file."); split(candidate,',',candFiles); - ScorerFactory sfactory; - scorer = sfactory.getScorer(scorerType,scorerConfig); + scorer = ScorerFactory::getScorer(scorerType,scorerConfig); cerr << "Using scorer: " << scorer->getName() << endl; scorer->setReferenceFiles(refFiles); PrintUserTime("Reference files loaded"); - + for (vector<string>::const_iterator it = candFiles.begin(); it != candFiles.end(); ++it) { @@ -125,6 +124,8 @@ int main(int argc, char** argv) PrintUserTime("Evaluation done"); + delete scorer; + return EXIT_SUCCESS; } catch (const exception& e) { cerr << "Exception: " << e.what() << endl; |