mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Improvements to ChronicleMap resource closing subsystem, making it more robust in exotic scenarios (OutOfMemoryError, StackOverflowError) and be able to close after incorrect attempt to close when a context is open in the same thread
This commit is contained in:
@@ -657,6 +657,8 @@ public abstract class VanillaChronicleHash<K,
|
||||
@Override
|
||||
public final void close() {
|
||||
if (resources.releaseManually()) {
|
||||
// Don't try to execute cleaner.clean() and ChronicleHashCloseOnExitHook.remove() from
|
||||
// finally section of try block wrapping resources.releaseManually(), because
|
||||
// Releases nothing after resources.releaseManually(), only removes the cleaner
|
||||
// from the internal linked list of all cleaners.
|
||||
cleaner.clean();
|
||||
|
||||
Reference in New Issue
Block a user