I use MapView
v2 in my application (not MapFragment
), which causes a memory leak. A leak occurs when I pass an Activity context to the MapView constructor. If I pass the application context to the MapView constructor, the memory leak will disappear, however, MapView starts to work poorly when scrolling through the ScrollView.
Here is a snapshot where the leak occurs:
Relevant code in MapView
:
public class MapView extends android.widget.FrameLayout { private final com.google.android.gms.maps.MapView.b gD; static class b extends com.google.android.gms.dynamic.a<com.google.android.gms.maps.MapView.a> { private final android.content.Context mContext;
I've been messing with MapView
for several weeks MapView
, trying to get it to behave properly in ScrollView
, but to no avail. I'm going to give it up.
Also, the recently added snapshot()
method is not an option, because I have already tried it and it does not give a reliable map snapshot. I have an open question about this here , as well as another open question here and here , all of which were not answered.
source share