From e9c9a402840bde9bbd290767e0356e0c1705feec Mon Sep 17 00:00:00 2001 From: Rob Austin Date: Wed, 27 Jan 2021 16:25:22 +0000 Subject: [PATCH] reverted AbstractClosable --- .../chronicle/hash/impl/VanillaChronicleHash.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java b/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java index 0c7e1f015..16f89f595 100644 --- a/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java +++ b/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java @@ -69,7 +69,7 @@ import static net.openhft.chronicle.map.ChronicleHashCorruptionImpl.format; import static net.openhft.chronicle.map.ChronicleHashCorruptionImpl.report; public abstract class VanillaChronicleHash, SC extends HashSegmentContext, - ECQ extends ExternalHashQueryContext> extends AbstractCloseable + ECQ extends ExternalHashQueryContext> implements ChronicleHash, Marshallable { public static final long TIER_COUNTERS_AREA_SIZE = 64; @@ -681,14 +681,12 @@ public abstract class VanillaChronicleHash, SC extends @Override - protected void performClose() { - if (resources == null || !resources.releaseManually()) - return; - - cleanupOnClose(); + public final void close() { + if (resources != null && resources.releaseManually()) { + cleanupOnClose(); + } } - protected void cleanupOnClose() { // Releases nothing after resources.releaseManually(), only removes the cleaner // from the internal linked list of all cleaners.