mirror of
https://github.com/amwatson/CitraVR.git
synced 2024-09-19 19:01:38 +02:00
Delete reference deletion lines and add forced exit to try to get around bug some users report on app switch
This commit is contained in:
parent
2446bc329a
commit
15b41d8421
2 changed files with 4 additions and 2 deletions
|
@ -249,7 +249,7 @@ void UILayer::Shutdown() {
|
|||
mVrUILayerClass = nullptr;
|
||||
// These steps are not strictly necessary for app shutdown, as references are cleaned up when
|
||||
// the JVM is destroyed, but memory-saving if this class is destroyed/re-initialized at runtime.
|
||||
mEnv->DeleteLocalRef(mVrUILayerObject);
|
||||
// mEnv->DeleteLocalRef(mVrUILayerObject);
|
||||
mVrUILayerObject = nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -1264,7 +1264,9 @@ Java_org_citra_citra_1emu_vr_VrActivity_nativeOnCreate(JNIEnv* env, jobject thiz
|
|||
}
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_org_citra_citra_1emu_vr_VrActivity_nativeOnDestroy(JNIEnv* env, jobject thiz, jlong handle) {
|
||||
|
||||
// Ensures a clean exit. This is currently not needed for proper cleanup, but may avoid the
|
||||
// crash on program switch some have reported.
|
||||
exit(0);
|
||||
ALOGI("nativeOnDestroy {}", static_cast<long>(handle));
|
||||
if (handle != 0) { delete VRAppHandle(handle).p; }
|
||||
VR::JNI::CleanupJNI(env);
|
||||
|
|
Loading…
Reference in a new issue