
I believe this is rather an Android SDK issue than a Mapbox one..
I have created an issue on issue tracker of LeakCanary as in the AOSP issue tracker
There is currently nothing actionable to do for us. closing.
I have identified that this line is the problem:
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
This leak can be prevented if we replace above with:
ConnectivityManager connectivityManager = (ConnectivityManager) context.getApplicationContext()
.getSystemService(Context.CONNECTIVITY_SERVICE);
This will land in the release branch of 3.1.0 in #3537.
This landed with 5ff95d4 in branch mentioned above.
@tobrun thanks man , i was stuck on this problem , life saver
Most helpful comment
I have identified that this line is the problem:
This leak can be prevented if we replace above with: