Access JNI Object to Java layer as reference pointer

前端 未结 2 1228
说谎
说谎 2021-01-13 21:08

I\'m writing an application where I have lot to do with JNI call and every-time I have to perform getter() call to access variable values. Instead

2条回答
  •  滥情空心
    2021-01-13 21:33

    You want to retain a reference to a C++ object from your Java side? you can't.

    Those implementations (C/Java) for representing and accessing objects/primitives are completely different. That's why there's so much mambo jambo functions when you you cast from one data type to another.

提交回复
热议问题