Skip to content
This repository has been archived by the owner on Apr 23, 2023. It is now read-only.

Another memory leak #197

Closed
rwrx opened this issue May 12, 2017 · 6 comments
Closed

Another memory leak #197

rwrx opened this issue May 12, 2017 · 6 comments
Assignees

Comments

@rwrx
Copy link

rwrx commented May 12, 2017

I have noticed that you got rid of some memory leaks in Lost. I have updated Mapzen Android SDK to latest version (I am using directly Git master version not compiled library from Maven) and tried whether memory leaks are not present, but unfortunately there is occurring another memory leak. I am sending screenshot from LeakCanary library which I am using in my app:

another-memory-leak

@msmollin
Copy link
Contributor

Woohoo, haha! Thanks for the report.

What commit did you compile and run this against out of curiosity? We did just merge a PR today that dealt with some of this and pulled the latest snapshot of LOST in -
mapzen/android#368

@rwrx
Copy link
Author

rwrx commented May 12, 2017

It is this lastest commit to master branch: mapzen/android@ad7898b . Hope this helps :).

@msmollin msmollin added the ready label May 17, 2017
@sarahsnow1
Copy link
Contributor

sarahsnow1 commented May 19, 2017

@rwrx Thanks for your report! Could you repost the LeakCanary screenshot? It looks like it has been removed in the link above? Nevermind! I've got an old copy of it. Will report back soon with findings.

@sarahsnow1 sarahsnow1 self-assigned this May 22, 2017
@sarahsnow1
Copy link
Contributor

Thank you for the report @rwrx !

I am able to reproduce something similar if I remove the call to unregister listener in the sample app's MultipleLocationListenerSingleClientActivity class. Can you verify that you have not forgotten to unregister a listener in your app?

screenshot_20170522-175512

On a related note, while debugging this issue, I discovered that we don't provide a way to unregister ConnectionCallbacks which resulted in this PR

@rwrx
Copy link
Author

rwrx commented May 23, 2017

Thank you for response and for trying it. Yes, I have there a call to LocationServices.FusedLocationApi.removeLocationUpdates(). But now I have realized that LocationServices.FusedLocationApi.requestLocationUpdates may be called more than once for a single object. Couldn't this be a problem? Or should that HashMap handle this?

Also from my screenshot there is no instance of some of classes from my app, besides that leaked MainActivity instance. So I assume that this is going from Mapzen Android SDK not from Lost itself. What do you think? Maybe I should post this to Mapezn Android SDK issues, but I didn't realized it before.

@msmollin msmollin added next and removed in progress labels May 24, 2017
@sarahsnow1 sarahsnow1 removed the next label Jun 14, 2017
@msmollin
Copy link
Contributor

Closing as this repo is no longer maintained.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants