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:
authorHieu Hoang <fishandfrolick@gmail.com>2013-03-16 02:02:00 +0400
committerHieu Hoang <fishandfrolick@gmail.com>2013-03-16 02:02:00 +0400
commit7888c7ba23fd83b1634c8f3a48ee9d429599dfc5 (patch)
treec69da7bf725c8e4d872c3bd81e0735ef30abb91a /moses-cmd
parentcedb41be2ac95d982841ebdec78150caa371e9d3 (diff)
parentdf5f0934be559418177ffa9a68c2e561918a310f (diff)
eclipse project files
Diffstat (limited to 'moses-cmd')
-rw-r--r--moses-cmd/Main.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/moses-cmd/Main.cpp b/moses-cmd/Main.cpp
index 0cf22db94..8e2957059 100644
--- a/moses-cmd/Main.cpp
+++ b/moses-cmd/Main.cpp
@@ -488,20 +488,20 @@ int main(int argc, char** argv)
// load all the settings into the Parameter class
// (stores them as strings, or array of strings)
- Parameter* params = new Parameter();
- if (!params->LoadParam(argc,argv)) {
+ Parameter params;
+ if (!params.LoadParam(argc,argv)) {
exit(1);
}
// initialize all "global" variables, which are stored in StaticData
// note: this also loads models such as the language model, etc.
- if (!StaticData::LoadDataStatic(params, argv[0])) {
+ if (!StaticData::LoadDataStatic(&params, argv[0])) {
exit(1);
}
// setting "-show-weights" -> just dump out weights and exit
- if (params->isParamSpecified("show-weights")) {
+ if (params.isParamSpecified("show-weights")) {
ShowWeights();
exit(0);
}
@@ -658,6 +658,8 @@ int main(int argc, char** argv)
pool.Stop(true); //flush remaining jobs
#endif
+ delete ioWrapper;
+
} catch (const std::exception &e) {
std::cerr << "Exception: " << e.what() << std::endl;
return EXIT_FAILURE;