I was reading this documentation on the SupportMapFragmet
, and it says:
Any objects obtained from the GoogleMap is associated with the view. It's important to not hold on to objects (e.g. Marker) beyond the view's life. Otherwise it will cause a memory leak as the view cannot be released.
I am a little puzzled about this because there isn't a way to modify the Markers
unless you hold a reference of them, like many questions in here say (like this and this)... so is it there something that I am missing?
I am currently using a HashMap
to associate my Markers
with other Objects
and I can't see how to avoid it. Will this leak memmory? Is it there a recommended way to edit the Marker
s and avoid memmory leak?