Skip to content

Commit a64222b

Browse files
authored
Merge pull request #101 from tappeddev/android-lifecycle-cleanup
android-lifecycle-cleanup
2 parents ffee56f + af3d279 commit a64222b

File tree

1 file changed

+2
-1
lines changed
  • arcgis_map_sdk_android/android/src/main/kotlin/dev/fluttercommunity/arcgis_map_sdk_android

1 file changed

+2
-1
lines changed

arcgis_map_sdk_android/android/src/main/kotlin/dev/fluttercommunity/arcgis_map_sdk_android/ArcgisMapView.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import android.view.LayoutInflater
66
import android.view.View
77
import androidx.lifecycle.Lifecycle
88
import androidx.lifecycle.LifecycleOwner
9-
import androidx.lifecycle.coroutineScope
109
import com.arcgismaps.ApiKey
1110
import com.arcgismaps.ArcGISEnvironment
1211
import com.arcgismaps.LicenseKey
@@ -157,6 +156,8 @@ internal class ArcgisMapView(
157156

158157
override fun dispose() {
159158
coroutineScope.cancel()
159+
160+
lifecycle.removeObserver(mapView)
160161
mapView.onDestroy(this)
161162
}
162163

0 commit comments

Comments
 (0)