Open
Description
Since the callback is leaking into memory, should we add a 'static constraint to it to make sure it's always valid, otherwise a JNIEnv <'local> is captured here, and it compiles. But the JNIEnv is only valid in the scope of the native method on_create
//native jni method
pub fn on_create(mut env: JNIEnv, jactivity: JObject) {
ThreadLooper::for_thread()
.unwrap()
.add_fd_with_callback(fd, FdEvent::INPUT, move || {
env.call_method(obj, name, sig, args);
})?;
}
Metadata
Metadata
Assignees
Labels
No labels