Prevent leaks of ChronicleMaps though thread local contexts and supplimental OldDeletedEntriesCleanupThread, add MemoryLeakTest

This commit is contained in:
leventov
2016-10-01 20:33:16 +03:00
parent 8981ae2fd0
commit 223b2d4329
16 changed files with 280 additions and 79 deletions
@@ -92,6 +92,11 @@ public abstract class CompactOffHeapLinearHashTable {
this.valueMask = mask(valueBits);
}
/**
* Must not store {@code h} in a field, to avoid memory leaks.
*
* @see net.openhft.chronicle.hash.impl.stage.hash.Chaining#initMap
*/
CompactOffHeapLinearHashTable(VanillaChronicleHash h) {
this(h.tierHashLookupCapacity, h.tierHashLookupSlotSize, h.tierHashLookupKeyBits,
h.tierHashLookupValueBits);