Hi all,
I'm using distributed locks and, both examining the stats Hazelcast provides via JMX and analyzing the heap-dump, we can see that the number of locks kept in memory is constantly growing.
The way I interact with Hazelcast is pretty simple: given an instance of HazelcastInstance I invoke getLock(lockId) whenever I need a new distributed lock; then the application code uses the lock as it was a typical JDK Lock instance, acquiring it and releasing it in a finally block, that's it.
Now, I've noticed that all these locks are accumulating in memory and does not look like they are getting released. Am I supposed to invoke the "Instance.destroy()" method exposed by the "ILock" interface to achieve this or will Hazelcast eventually infer that the lock can be removed from memory?
Thanks in advance, this is point is pretty crucial for it might be the cause of a memory-leak...
F.