Merge "Run GC when needed, instead of too late."

main
Jean Chalard 2013-12-17 09:29:10 +00:00 committed by Android (Google) Code Review
commit 042a301f1c
1 changed files with 3 additions and 3 deletions

View File

@ -91,9 +91,9 @@ public class Ver4DictEncoder implements DictEncoder {
for (final WeightedString word1 : word0.mBigrams) { for (final WeightedString word1 : word0.mBigrams) {
binaryDict.addBigramWords(word0.mWord, word1.mWord, word1.mFrequency, binaryDict.addBigramWords(word0.mWord, word1.mWord, word1.mFrequency,
0 /* timestamp */); 0 /* timestamp */);
} if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) {
if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) { binaryDict.flushWithGC();
binaryDict.flushWithGC(); }
} }
} }
binaryDict.flushWithGC(); binaryDict.flushWithGC();