Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of AccountManager causing memory leak #882

Closed
AaronRietschlin opened this issue May 11, 2015 · 2 comments
Closed

Use of AccountManager causing memory leak #882

AaronRietschlin opened this issue May 11, 2015 · 2 comments

Comments

@AaronRietschlin
Copy link

I added LeakCanary to my project that uses the android SDK, and I receive a notification of a memory leak after every screen. The following is the memory leak:

05-11 08:54:26.451  27157-28173/com.my.app.debug D/LeakCanary﹕ In com.my.app.debug:1.0.0_debug:3.
* com.my.app.ui.ActivityHome has leaked:
* GC ROOT android.accounts.AccountManager$AmsTask$Response.this$1
* references android.accounts.AccountManager$7.mActivity (anonymous class extends android.accounts.AccountManager$AmsTask)
* leaks com.my.app.ui.ActivityHome instance
* Reference Key: 177d2905-d065-4eb3-b9ff-e7012a72e487
* Device: Genymotion generic Google API - Nexus 5 - 5.0.0 - API 21 - 1080x1920 vbox86p
* Android Version: 5.0 API: 21
* Durations: watch=5011ms, gc=114ms, heap dump=482ms, analysis=3251ms

I cannot track down exactly where this is happening, but I did notice that if I comment out the code that instantiates the ClientManager, my app does not leak any activities. I am not sure if this is something that you guys would add a fix for, if this is a memory leak inside of the Android SDK.

@pyricau
Copy link

pyricau commented May 16, 2015

@bhariharan
Copy link
Contributor

I'm closing this issue, since this is not an issue specific to the Salesforce Mobile SDK. We will monitor the bug filed with AOSP for updates.

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

No branches or pull requests

3 participants