smart-location-lib icon indicating copy to clipboard operation
smart-location-lib copied to clipboard

Possible to solve memory leak

Open mortenholmgaard opened this issue 6 years ago • 3 comments

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()
}

mortenholmgaard avatar Jun 25 '18 12:06 mortenholmgaard

@mrmans0n please merge this pull request since it resolves a critical memory leak issue. thanks for the library.

ugurcany avatar Aug 01 '18 21:08 ugurcany

@mortenholmgaard if you hope to have a PR taken seriously, you might want to rebase your branch before submitting:

  • Fix
  • Fix
  • Fix
  • Fix . . . etc

christocracy avatar Aug 01 '18 21:08 christocracy

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.

mortenholmgaard avatar Aug 05 '18 08:08 mortenholmgaard