diff options
author | hieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230> | 2010-10-12 18:47:58 +0400 |
---|---|---|
committer | hieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230> | 2010-10-12 18:47:58 +0400 |
commit | ac875ffc81d92dbd9652bc2e8e75a130361e43a3 (patch) | |
tree | 50e2a73b9bd75508dbdb3709b9cdc3ac57bb5d71 /OnDiskPt | |
parent | 620d92c68aa065e918b810f032e97ed18876744f (diff) |
mem leak
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3617 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'OnDiskPt')
-rw-r--r-- | OnDiskPt/src/TargetPhrase.cpp | 8 | ||||
-rw-r--r-- | OnDiskPt/src/TargetPhrase.h | 3 | ||||
-rw-r--r-- | OnDiskPt/src/TargetPhraseCollection.cpp | 4 | ||||
-rw-r--r-- | OnDiskPt/src/TargetPhraseCollection.h | 1 |
4 files changed, 4 insertions, 12 deletions
diff --git a/OnDiskPt/src/TargetPhrase.cpp b/OnDiskPt/src/TargetPhrase.cpp index a54eb701a..3389fb7a1 100644 --- a/OnDiskPt/src/TargetPhrase.cpp +++ b/OnDiskPt/src/TargetPhrase.cpp @@ -188,14 +188,10 @@ Moses::TargetPhrase *TargetPhrase::ConvertToMoses(const std::vector<Moses::Facto , const Moses::PhraseDictionary &phraseDict , const std::vector<float> &weightT , const Moses::WordPenaltyProducer* wpProducer - , const Moses::LMList &lmList - , const Moses::Phrase &sourcePhrase) const + , const Moses::LMList &lmList) const { Moses::TargetPhrase *ret = new Moses::TargetPhrase(Moses::Output); - - // source phrase - ret->SetSourcePhrase(&sourcePhrase); - + // words size_t phraseSize = GetSize(); assert(phraseSize > 0); // last word is lhs diff --git a/OnDiskPt/src/TargetPhrase.h b/OnDiskPt/src/TargetPhrase.h index 64805d917..6d571815c 100644 --- a/OnDiskPt/src/TargetPhrase.h +++ b/OnDiskPt/src/TargetPhrase.h @@ -72,8 +72,7 @@ public: , const Moses::PhraseDictionary &phraseDict , const std::vector<float> &weightT , const Moses::WordPenaltyProducer* wpProducer - , const Moses::LMList &lmList - , const Moses::Phrase &sourcePhrase) const; + , const Moses::LMList &lmList) const; UINT64 ReadOtherInfoFromFile(UINT64 filePos, std::fstream &fileTPColl); UINT64 ReadFromFile(std::fstream &fileTP, size_t numFactors); diff --git a/OnDiskPt/src/TargetPhraseCollection.cpp b/OnDiskPt/src/TargetPhraseCollection.cpp index b035279c3..50c6b4b20 100644 --- a/OnDiskPt/src/TargetPhraseCollection.cpp +++ b/OnDiskPt/src/TargetPhraseCollection.cpp @@ -103,7 +103,6 @@ Moses::TargetPhraseCollection *TargetPhraseCollection::ConvertToMoses(const std: , const std::vector<float> &weightT , const Moses::WordPenaltyProducer* wpProducer , const Moses::LMList &lmList - , const Moses::Phrase &sourcePhrase , const std::string &filePath , Vocab &vocab) const { @@ -118,8 +117,7 @@ Moses::TargetPhraseCollection *TargetPhraseCollection::ConvertToMoses(const std: , phraseDict , weightT , wpProducer - , lmList - , sourcePhrase); + , lmList); /* // debugging output diff --git a/OnDiskPt/src/TargetPhraseCollection.h b/OnDiskPt/src/TargetPhraseCollection.h index ca56bbb34..e904d2dbe 100644 --- a/OnDiskPt/src/TargetPhraseCollection.h +++ b/OnDiskPt/src/TargetPhraseCollection.h @@ -53,7 +53,6 @@ public: , const std::vector<float> &weightT , const Moses::WordPenaltyProducer* wpProducer , const Moses::LMList &lmList - , const Moses::Phrase &sourcePhrase , const std::string &filePath , Vocab &vocab) const; void ReadFromFile(size_t tableLimit, UINT64 filePos, OnDiskWrapper &onDiskWrapper); |