There is a memory leak in my app that is using OsmDroid. After some search, I found the leak is caused by the MyLocationNewOverlay.enableMyLocation() method:
mMyLocationNewOverlay.enableMyLocation();
If I comment that line out, there will be no memory leak. I think I forgot to deregister the location listener at onPause() or OnStop(). So I try to deregister it at onPause() by using:
mMyLocationNewOverlay.disableMyLocation();
However, the leak still occurs. I even tried to remove the whole mMyLocationNewOverlay but it still doesn't work. I am wondering what is the proper way to deregister the location listener in OsmDroid and fix the memory leak?