-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Remove JniClass and fix multiple local/global reference leaks in JNI #31785
[Android] Remove JniClass and fix multiple local/global reference leaks in JNI #31785
Conversation
59bf91c
to
e32d66c
Compare
PR #31785: Size comparison from 5f955f4 to e32d66c Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, stm32, telink)
|
7c01697
to
c232808
Compare
c232808
to
84dc16d
Compare
PR #31785: Size comparison from bdbd6de to 84dc16d Full report (29 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, k32w, mbed, nrfconnect, qpg, stm32)
|
PR #31785: Size comparison from bdbd6de to 1715f7f Full report (41 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, stm32)
|
1715f7f
to
7d9cd49
Compare
PR #31785: Size comparison from bdbd6de to 7d9cd49 Full report (19 builds for cc13x4_26x4, cc32xx, k32w, mbed, nrfconnect, qpg, stm32)
|
7d9cd49
to
892d6b9
Compare
PR #31785: Size comparison from bdbd6de to 892d6b9 Full report (19 builds for cc13x4_26x4, cc32xx, k32w, mbed, nrfconnect, qpg, stm32)
|
892d6b9
to
585dbfa
Compare
PR #31785: Size comparison from bdbd6de to 585dbfa Full report (7 builds for cc32xx, mbed, nrfconnect, stm32)
|
PR #31785: Size comparison from bdbd6de to 0a5cc78 Decreases (1 build for efr32)
Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, stm32, telink)
|
0a5cc78
to
9dfd662
Compare
PR #31785: Size comparison from cdd128b to 9dfd662 Decreases (1 build for efr32)
Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, stm32, telink)
|
9dfd662
to
f2d8647
Compare
PR #31785: Size comparison from 4422581 to f2d8647 Decreases (1 build for efr32)
Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, stm32, telink)
|
JniClass is used to release global reference for jni class when using GetClassRef, and GetClassRef creates both local and global reference, which is causing multiple leaks for local references because we don't release local one sometimes in callback code path from c++ to java/kotlin. In order to resolve this issue, in previous PR, we applied the below
This PR use GetLocalClassRef and fix the local/global reference leak, and fully remove JniClass.