Skip to content
Snippets Groups Projects
Commit 042a301f authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

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

parents c2fd53ee 41963609
No related branches found
No related tags found
No related merge requests found
......@@ -91,9 +91,9 @@ public class Ver4DictEncoder implements DictEncoder {
for (final WeightedString word1 : word0.mBigrams) {
binaryDict.addBigramWords(word0.mWord, word1.mWord, word1.mFrequency,
0 /* timestamp */);
}
if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) {
binaryDict.flushWithGC();
if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) {
binaryDict.flushWithGC();
}
}
}
binaryDict.flushWithGC();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment