Why does JNI Global reference have Maximum number limit?
问题 As we known, JNI is a bridge between Java and C++. Recently i'm coding for a Java project and it's main module is based on C++ which need to store a large number of GlobalReference . And it will increase along with activity being opened. Therefore the maximum number (65535) of GlobalReferences become a serious problem and i have to solve the problem using peculiar method. So i'm interested in why there is a limit on GlobalReferences . Is it only for detecting the memory leaks as other's