You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
which means that the listeners are never fired because when null, nothing is done.
For debugging purposes we've removed the WeakReferences and the callbacks were 👌 Obviously, in order to keep avoiding potential memory leaks, this is not enough, but maybe we could add a setter in the tasks, that could be set to null accordingly, so it's garbage collected without needing WeakReference. Thoughts?
Integrating offline maps downstream in
mapbox-navigation-android
👀 mapbox/mapbox-navigation-android#1895 we've noticed that when trying tomergeOfflineRegions
theOfflineManager.MergeOfflineRegionsCallback
listeners are never fired https://github.com/mapbox/mapbox-navigation-android/blob/1ced0224aab1484024af079745498dd401d0882f/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/MapOfflineManager.java#L58-L68We were able to reproduce in
mapbox-gl-native
https://github.com/mapbox/mapbox-gl-native/tree/pg-downstream-module and after debugging it seems that theWeakReference
s callbacks implemented inFileUtils
mapbox-gl-native/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/FileUtils.java
Line 20 in d25ae1c
mapbox-gl-native/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/FileUtils.java
Line 77 in d25ae1c
null
mapbox-gl-native/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/FileUtils.java
Line 45 in d25ae1c
mapbox-gl-native/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/FileUtils.java
Line 102 in d25ae1c
null
, nothing is done.For debugging purposes we've removed the
WeakReference
s and the callbacks were 👌 Obviously, in order to keep avoiding potential memory leaks, this is not enough, but maybe we could add a setter in the tasks, that could be set tonull
accordingly, so it's garbage collected without needingWeakReference
. Thoughts?cc @zugaldia
The text was updated successfully, but these errors were encountered: