I am using ChronicleMap in JavaEE7/CDI app. Conversation scope is used a lot. It's very difficult to predict where the user will exit the conversation in order to close the maps.
Although I am trying to close all instances in a @PreDestroy method, apparently I am not closing all of them.
What is the consequence of the following error:
11:20:47,866 ERROR [net.openhft.chronicle.hash.impl.ChronicleHashResources] (Reference Handler) ChronicleMap{name=null, file=null, identityHashCode=1146047764} is not closed manually, cleaned up from Cleaner
Does it harm to not manually close the maps?
Is a map first closed before it's cleaned up from the Cleaner?
Thanks
Not closing Chronicle Maps is not more harmful than e. g. not unmapping direct ByteBuffers manually. It may lead to OutOfMemoryError in some unfortunate scenarios, even though formally the live working set of objects + live off-heap memory never exceeds the configured limits.