qt6-bb10/tests/auto/corelib/kernel/qjniobject
Volker Hilsheimer 72ad419116 JNI: Fix reference leak in QJniArray
When the array type is QJniObject or a subclass, then we need to
explicitly release the local reference returned by GetObjectArrayElement
in the QJniArray::at implementation. Do this by constructing the
QJniObject via fromLocalRef, which does exactly that.
Amends 80d4d55e25.

Add a test case that stresses the local reference pool, and fix the old
test case (which operates on a QJniArray<jobject>) to also release the
local references.

Change-Id: Ie293b1db9f1b6825376bbf12338b22dfc3f8c6e9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-10-23 15:10:28 +02:00
..
testdata/src/org/qtproject/qt/android/testdata JNI: add QJniArray class for easier working with arrays 2023-10-16 18:43:16 +02:00
CMakeLists.txt CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
tst_qjniobject.cpp JNI: Fix reference leak in QJniArray 2023-10-23 15:10:28 +02:00