smart-location-lib
smart-location-lib copied to clipboard
Possible to solve memory leak
This change make it possible to fix a memory leak in leaking listener in LocationGooglePlayServicesProvider.java and LocationGooglePlayServicesWithFallbackProvider.java
private var locationControl: SmartLocation.LocationControl? = null
locationControl = SmartLocation.with(context).location()
locationControl!!.oneFix().start { location ->
...
}
override fun onDestroy() {
locationControl?.destroy()
super.onDestroy()
}
@mrmans0n please merge this pull request since it resolves a critical memory leak issue. thanks for the library.
@mortenholmgaard if you hope to have a PR taken seriously, you might want to rebase your branch before submitting:
- Fix
- Fix
- Fix
- Fix . . . etc
I do not really expect it to be merge because there do not seem to any activity on this lib from the author any way, so it was mostly for my self and others with same problem. So I did not want to spend time on it.