My app is leaking the root layout of one of its activities every time that activity is destroyed. Merging shortest paths to GC roots shows only one root for each leaked instance, and the path is all Google Maps API classes:
com.google.android.gms.location.internal.t @ 0x42387220 Native Stack
'- a com.google.android.gms.location.internal.s @ 0x42387268
'- a com.google.maps.api.android.lib6.d.v @ 0x425f73a0
'- c com.google.maps.api.android.lib6.d.aj @ 0x4261f5d8
'- i com.google.maps.api.android.lib6.gmm6.c.a @ 0x425fbbf0
'- d com.google.maps.api.android.lib6.gmm6.c.y @ 0x42754cd0
'- mParent android.widget.FrameLayout @ 0x4261f678
'- mParent android.widget.FrameLayout @ 0x4245c6c0
'- mParent android.widget.RelativeLayout @ 0x4254ca08
I'm not using FrameLayout anywhere, so I assume that's part of the MapFragment UI.
What could I possibly be doing to cause this? The activity doesn't do anything with the map except call setMyLocationEnabled(true) on it. I'm not creating any markers or anything.
This is how the fragment is declared in the activity XML:
<fragment
android:name="com.google.android.gms.maps.MapFragment"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/fake_status_bar"
android:layout_toRightOf="@id/leftButtons"
android:layout_margin="3dp" />
I'm using google-play-services_lib version 26, which is the latest.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire