diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-03-15 16:30:39 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-03-15 16:30:39 +0400 |
commit | 3da09b921c8278f5a808f6e951e329d04ab186f7 (patch) | |
tree | 0dde90f40216bee2767b9f0514dd4aa3270d93eb /moses-cmd | |
parent | 802f5ab3b78cfb12cff05753a3677a0f998c24c0 (diff) |
memory leak
Diffstat (limited to 'moses-cmd')
-rw-r--r-- | moses-cmd/Main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/moses-cmd/Main.cpp b/moses-cmd/Main.cpp index 624c31994..9f610204f 100644 --- a/moses-cmd/Main.cpp +++ b/moses-cmd/Main.cpp @@ -495,20 +495,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(¶ms, 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); } |