Skip to content

Conversation

inkeliz
Copy link
Contributor

@inkeliz inkeliz commented Jun 1, 2025

No description provided.

Copy link
Member

@whereswaldon whereswaldon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for providing this reference implementation @inkeliz! I noted a lifecycle issue with global JNI references, but your email to the list implies that you have other concerns with the implementation. Would you mind listing what (in your mind) needs to be improved here in order for this code to be ready for production use? I lack your expertise in Android APIs.

Comment on lines +39 to +40
f.libObject = jni.NewGlobalRef(env, obj)
f.libClass = jni.Class(jni.NewGlobalRef(env, jni.Object(class)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where and how are these global references cleaned up? I don't see any mechanism to do that, and I don't think the JVM is able to do it automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants