diff --git a/vector/src/main/java/im/vector/app/features/location/LocationSharingActivity.kt b/vector/src/main/java/im/vector/app/features/location/LocationSharingActivity.kt index 2c97913a89..169af4a5a2 100644 --- a/vector/src/main/java/im/vector/app/features/location/LocationSharingActivity.kt +++ b/vector/src/main/java/im/vector/app/features/location/LocationSharingActivity.kt @@ -35,7 +35,7 @@ data class LocationSharingArgs( @AndroidEntryPoint class LocationSharingActivity : VectorBaseActivity() { -// TODO fix leak of mapTilerView + override fun getBinding() = ActivityLocationSharingBinding.inflate(layoutInflater) override fun initUiAndData() { diff --git a/vector/src/main/java/im/vector/app/features/location/MapTilerMapView.kt b/vector/src/main/java/im/vector/app/features/location/MapTilerMapView.kt index 491386ba64..698f8874b3 100644 --- a/vector/src/main/java/im/vector/app/features/location/MapTilerMapView.kt +++ b/vector/src/main/java/im/vector/app/features/location/MapTilerMapView.kt @@ -76,6 +76,12 @@ class MapTilerMapView @JvmOverloads constructor( showLocationButton = typedArray.getBoolean(R.styleable.MapTilerMapView_showLocateButton, false) } + override fun onDestroy() { + mapRefs?.symbolManager?.onDestroy() + mapRefs = null + super.onDestroy() + } + /** * For location fragments. */ diff --git a/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationMapViewFragment.kt b/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationMapViewFragment.kt index 1e1faa26f5..283774dbc6 100644 --- a/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationMapViewFragment.kt +++ b/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationMapViewFragment.kt @@ -113,6 +113,7 @@ class LiveLocationMapViewFragment @Inject constructor() : VectorBaseFragment