[foreign-jextract] RFR: 8253307: Simplify code in RuntimeHelper::lookupGlobalVariable

Maurizio Cimadamore mcimadamore at openjdk.java.net
Fri Sep 18 09:55:13 UTC 2020


On Fri, 18 Sep 2020 09:12:06 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:

> While this solves the issue for for jextract which keeps LinkerLookups, as a general API usage, this should be
> documented then i.e, it is up to the user to keep linker lookup objects alive
> In the JNI world this problem does not arise because NativeLibrary is always loaded in the context of the class loader
> that loaded and so native libraries are alive as long as the class loader is alive.

We do have some javadoc covering that already.

Not super sure about JNI - will creating a BB from JNI code (from a random point) keep the library alive? How?

-------------

PR: https://git.openjdk.java.net/panama-foreign/pull/339


More information about the panama-dev mailing list