lz4-java
lz4-java copied to clipboard
StreamingXXHash issues
-
StreamingXXHash32JNI
andStreamingXXHash64JNI
should not overridefinalize()
, it's bad for GC. Instead, they should use Cleaner. - They should support close() for explicit resource release.
- The close() method should be synchronized to avoid racy free, this is a workaround in the absence of
Reference.reachabilityFence()
.
Thanks for the issue report.
- Agree, and I don't have a plan to upgrade to Java 9 in the near future, but will use Cleaner then.
- I'll work on it. Do you think it should implement the Closeable interface?
- Agree. I think all the other methods (reset, getValue, and update) must also be synchronized, correct?
- Yes
- Yes