How to cache jclass?
For performance issue, I had to cache a jclass, but NewGlobalRef only accepted a jobject as input, looks like jni doesn't allow use开发者_Python百科r to cache a jclass? Will it work if I have to strongly cast jclass to jobject?
You shouldn't have to cast. jclass
is internally just a typedef for jobject
.
精彩评论