diff options
| author | Juha Vuolle <juha.vuolle@qt.io> | 2023-10-11 16:32:53 +0300 |
|---|---|---|
| committer | Juha Vuolle <juha.vuolle@qt.io> | 2023-10-12 17:12:04 +0300 |
| commit | c0bc0d0643ea94d8f7c935e7806f10083993e496 (patch) | |
| tree | 8b22418b33664382dee297ce92a16c70966d3f74 /src/widgets/doc/snippets/code | |
| parent | 4102db752e808cf33cf5e511b8902d3223afdc26 (diff) | |
Android: fix double-freeing of a global references on app exit
The m_activityObject and m_serviceObjects are no longer plain
jobjects. Instead they are constructed with a jobject.
The constructor makes it a global ref, which the destructor
then frees. The destruction happens when the stdlib exit()
is called.
However, since the terminateQt() function already had released the
global ref, the destruction of the objects crashes the
application with a JNI APPLICATION ERROR in Android logs.
In addition since the the code only ever freed the reference to
a reference, the actual reference was leaked.
Change-Id: I6bb637dba2de59e89436685a9d63950d36438fa5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src/widgets/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions
