[Scummvm-git-logs] scummvm master -> f79d5d9b6baa3e002c93df22d29eac62de3e618f
antoniou79
antoniou at cti.gr
Tue Sep 24 11:40:34 CEST 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f79d5d9b6b ANDROID: Use _system->destroy() instead of just delete in JNI::Destroy()
Commit: f79d5d9b6baa3e002c93df22d29eac62de3e618f
https://github.com/scummvm/scummvm/commit/f79d5d9b6baa3e002c93df22d29eac62de3e618f
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2019-09-24T12:40:18+03:00
Commit Message:
ANDROID: Use _system->destroy() instead of just delete in JNI::Destroy()
Changed paths:
backends/platform/android/android.cpp
backends/platform/android/jni.cpp
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 5614d0a..7513639 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -129,8 +129,6 @@ OSystem_Android::~OSystem_Android() {
delete _savefileManager;
_savefileManager = 0;
-
- ModularBackend::quit();
}
void *OSystem_Android::timerThreadFunc(void *arg) {
diff --git a/backends/platform/android/jni.cpp b/backends/platform/android/jni.cpp
index 5e4c116..2c27838 100644
--- a/backends/platform/android/jni.cpp
+++ b/backends/platform/android/jni.cpp
@@ -562,9 +562,13 @@ void JNI::destroy(JNIEnv *env, jobject self) {
delete _asset_archive;
_asset_archive = 0;
- delete _system;
+ // _system is a pointer of OSystem_Android <--- ModularBackend <--- BaseBacked <--- Common::OSystem
+ // It's better to call destroy() rather than just delete here
+ // to avoid mutex issues if a Common::String is used after this point
+ _system->destroy();
+
g_system = 0;
- _system = 0;
+ _system = 0;
sem_destroy(&pause_sem);
More information about the Scummvm-git-logs
mailing list