mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Don't force writing the memory to disk in VanillaChronicleHash.close(), release the virtual memory instead
This commit is contained in:
@@ -584,15 +584,14 @@ public abstract class VanillaChronicleHash<K,
|
||||
if (closed)
|
||||
return;
|
||||
closed = true;
|
||||
if (file != null) {
|
||||
try (RandomAccessFile raf = new RandomAccessFile(file, "rw")) {
|
||||
raf.getChannel().force(true);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
bs.release();
|
||||
assert bs.refCount() == 0;
|
||||
for (TierBulkData bulkData : tierBulkOffsets) {
|
||||
if (bulkData.bytesStore != bs) {
|
||||
bulkData.bytesStore.release();
|
||||
assert bulkData.bytesStore.refCount() == 0;
|
||||
}
|
||||
}
|
||||
bs = null;
|
||||
file = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user