Mapbox GL Android SDK : Keep this in mind to avoid memory leaks

If you are using mapbox android SDK you are very likely to end up having a HUGE memory leak if you are not taking the special precaution.

Please remember to call all lifecycle methods on your mapview. And perticularly onDestroy()

If you forgot to call onDestroy() on your mapview it will result into a HUGE memory leak which you can even validate and check using your android studio profiler.

A memory leak will be huge to an extent that it will throw up your app memory usage to 1.5 GB on your smartphone for an app which usually do not consume more than 100 MB.

So take care of that you are calling onDestroy() on your mapviews and all other lifecycle methods and you will be fine.


For more info see this link : and see the overview section



Leave a Reply

Your email address will not be published. Required fields are marked *