This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Memory leak caused by duplicated add in LocationListener list
The addLocationListener method didn't check if the LocationListener was already in the list. From MapView, if we call setMyLocationEnabled(true), it adds a LocationListener and onResume adds the same LocationListener again, but is just removed by onPause. So LocationListener is added twice but removed just once, so LocationServices singleton keeps an instance of the the LocationListener that is never released.
- Loading branch information