livesplit-core
livesplit-core copied to clipboard
[Java, JNA] `Object.finalize` is deprecated and subject to removal as of Java 9
It would be great if you could provide some code of how it's supposed to be done now.
Java 9 has Cleaner, and if you can't use Java 9 features, you can reimplement it using PhantomReference, though it's a little complicated—this blog post seems helpful.
You could also have the classes implement AutoCloseable and require a try-with-resources construction or have the user free it manually.