make mPreview null at destroying MainActivity

This commit is contained in:
tibbi 2017-12-02 18:02:27 +01:00
parent b94d7305ea
commit 36a390a96b
2 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,7 @@ ext {
}
dependencies {
implementation 'com.simplemobiletools:commons:3.0.20'
implementation 'com.simplemobiletools:commons:3.0.22'
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"

View File

@ -109,6 +109,7 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave
super.onDestroy()
mPreview?.releaseCamera()
mPreview?.mActivity = null
mPreview = null
}
private fun initVariables() {