Deallocate direct NIO buffers
Julien Gouesse
gouessej at yahoo.fr
Thu Aug 4 12:09:05 UTC 2016
Hi
The class sun.misc.Cleaner was moved into the package jdk.internal.ref in the module jdk.unsupported and I have to use a command line switch or another mean to add an export to this module to avoid getting a java.lang.reflect.InaccessibleObjectException. I could use a NativeScope in a source code compatible with Java 1.9 and later but I need to find a solution working both with Java 1.8 and Java 1.9. Christoph Engelbert mentioned the class AutoCleaning here:http://www.slideshare.net/ChristophEngelbert/a-postapocalyptic-sunmiscunsafe-world#94What is the right way to release the native memory allocated by a direct NIO buffer without using any internal API in Java 1.9 and later? I need an explicit mechanism that calls Cleaner.clean() somehow. In which package can I find the class AutoCleaning? Best regards.
More information about the panama-dev
mailing list