Make OnHeapIncrementalIndex clean maps on close()

This commit is contained in:
Charles Allen 2016-01-04 11:17:36 -08:00
parent 03a70fc227
commit 91fc32749b
1 changed files with 12 additions and 0 deletions

View File

@ -243,6 +243,18 @@ public class OnheapIncrementalIndex extends IncrementalIndex<Aggregator>
return concurrentGet(rowOffset)[aggOffset].get();
}
/**
* Clear out maps to allow GC
* NOTE: This is NOT thread-safe with add... so make sure all the adding is DONE before closing
*/
@Override
public void close()
{
super.close();
aggregators.clear();
facts.clear();
}
private static class OnHeapDimDim implements DimDim
{
private final Map<String, Integer> falseIds;