Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Removing marker does not deselect it, causing memory leak #9028

Closed

Description

@jonl-percsolutions-com

Platform: Android
Mapbox SDK version: mapox-android-sdk-4.2.2, however, confirmed same behavior appears to be in the current code base in AnnotationManager; https://github.com/mapbox/mapbox-gl-native/blob/master/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AnnotationManager.java

Steps to trigger behavior

  1. Select marker on map
  2. remove Marker from Map
  3. check selectedMarkers list that marker still in list

Expected behavior

removing a marker from the map also removes the marker from the selectedMarkers

Actual behavior

removing a marker from the map hides the infowindow, removes it from the list of annotations but does not remove it from the selectedMarkers list.

Activity

  1. jonl-percsolutions-com commented on May 17, 2017

    @jonl-percsolutions-com
    Author

    workaround: before removing a marker, call deselectMarker. If clearing the map, call map.deselectMakers()

  2. added
    Android
    on May 18, 2017
  3. added this to the android-v5.1.0 milestone on May 19, 2017
  4. tobrun commented on May 19, 2017

    @tobrun
    Member

    Thank you for the report @jonl-percsolutions-com, fix in #9047. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Android

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions