Bluetooth: Delete Local JNI References
In android_server_BluetoothEventLoop.c and android_server_BluetoothA2dpService functions, local references to Java objects while running in the eventloop context are not explicitly deleted when the functions return. Local references are implicitly deleted by the JVM when JNI code returns. However, in this implementation the eventloop code runs as a separate native thread which is not called from the JVM, therefore any local references created are not released by the JVM. To prevent memory from being leaked and reference oveflow in the JVM, these local references need to be explicitly released. CRs-fixed: 211008 211226
Loading
Please register or sign in to comment