diff options
author | 2011-12-15 10:10:59 -0800 | |
---|---|---|
committer | 2011-12-15 10:10:59 -0800 | |
commit | 3923736dc18e264767eb1e6de04af4398406545b (patch) | |
tree | e343ce7cb0877eb572f132ddc953a6b7a847cf68 /native/src/dictionary.cpp | |
parent | 2d651760c4ab56ad5bbdf214c69ae3b9b8e11c01 (diff) | |
parent | a7e5a5a6b9ed1367a4bb81c874d0fde7de85a787 (diff) | |
download | latinime-3923736dc18e264767eb1e6de04af4398406545b.tar.gz latinime-3923736dc18e264767eb1e6de04af4398406545b.tar.xz latinime-3923736dc18e264767eb1e6de04af4398406545b.zip |
am a7e5a5a6: Add words priority queue pool
* commit 'a7e5a5a6b9ed1367a4bb81c874d0fde7de85a787':
Add words priority queue pool
Diffstat (limited to 'native/src/dictionary.cpp')
-rw-r--r-- | native/src/dictionary.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/native/src/dictionary.cpp b/native/src/dictionary.cpp index 55358ec81..e3673d425 100644 --- a/native/src/dictionary.cpp +++ b/native/src/dictionary.cpp @@ -39,7 +39,8 @@ Dictionary::Dictionary(void *dict, int dictSize, int mmapFd, int dictBufAdjust, } } mCorrection = new Correction(typedLetterMultiplier, fullWordMultiplier); - mWordsPriorityQueue = new WordsPriorityQueue(maxWords, maxWordLength); + mWordsPriorityQueuePool = new WordsPriorityQueuePool( + maxWords, SUB_QUEUE_MAX_WORDS, maxWordLength); mUnigramDictionary = new UnigramDictionary(mDict, typedLetterMultiplier, fullWordMultiplier, maxWordLength, maxWords, maxAlternatives, IS_LATEST_DICT_VERSION); mBigramDictionary = new BigramDictionary(mDict, maxWordLength, maxAlternatives, @@ -48,7 +49,7 @@ Dictionary::Dictionary(void *dict, int dictSize, int mmapFd, int dictBufAdjust, Dictionary::~Dictionary() { delete mCorrection; - delete mWordsPriorityQueue; + delete mWordsPriorityQueuePool; delete mUnigramDictionary; delete mBigramDictionary; } |