Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTetsuo Kiso <tetsuo-s@is.naist.jp>2011-11-11 15:40:59 +0400
committerTetsuo Kiso <tetsuo-s@is.naist.jp>2011-11-11 15:40:59 +0400
commitc2121695c2a7be7538745759f2f86ec280baa54d (patch)
treee1e30e8a573890f8c380e6c49f7ada43c7359148 /mert/evaluator.cpp
parent85d39d7d428a2ae1fbf4ee08c1146181b87b5d9d (diff)
Fix memory leaks in mert.
Diffstat (limited to 'mert/evaluator.cpp')
-rw-r--r--mert/evaluator.cpp7
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;