make mPreview null at destroying MainActivity
This commit is contained in:
parent
b94d7305ea
commit
36a390a96b
|
@ -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"
|
||||
|
|
|
@ -109,6 +109,7 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave
|
|||
super.onDestroy()
|
||||
mPreview?.releaseCamera()
|
||||
mPreview?.mActivity = null
|
||||
mPreview = null
|
||||
}
|
||||
|
||||
private fun initVariables() {
|
||||
|
|
Loading…
Reference in New Issue