java - Can jmethodID initialized on one thread be used in another thread? -
can use jmethodid
intialized on 1 thread in thread ? asked because jvm crashing when run jni program,in have initialized jmethodid
on 1 thread , using in thread. thinking if reason.
i have kept jmethodid
global varibale declaring @ top. in 1 of call initialize , in subsequent calls attempt reuse it.
quoting jni specification:
a field or method id not prevent vm unloading class id has been derived. after class unloaded, method or field id becomes invalid. native code, therefore, must make sure to:
keep live reference underlying class, or recompute method or field id
if intends use method or field id extended period of time.
Comments
Post a Comment