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

Memory leak on ver 2.2.0 #160

Open
jonbhanson opened this issue Apr 27, 2020 · 2 comments
Open

Memory leak on ver 2.2.0 #160

jonbhanson opened this issue Apr 27, 2020 · 2 comments

Comments

@jonbhanson
Copy link

jonbhanson commented Apr 27, 2020

Thanks for a great component!
I am getting a memory leak when I navigate away from a fragment that contains the Loading Button.
I added a manual call to .dispose() in the fragment's onDestroyView, but that did not help.

Here is the LeakCanary dump:

┬───
│ GC Root: Global variable in native code

├─ com.google.android.gms.internal.location.zzat instance
│ Leaking: NO (MainActivity↓ is not leaking)
│ ↓ zzat.zzda
├─ com.google.android.gms.common.api.internal.ListenerHolder instance
│ Leaking: NO (MainActivity↓ is not leaking)
│ ↓ ListenerHolder.zajn
├─ app.xchangr.xchangr.MainActivity$14 instance
│ Leaking: NO (MainActivity↓ is not leaking)
│ Anonymous subclass of com.google.android.gms.location.LocationCallback
│ ↓ MainActivity$14.this$0
├─ app.xchangr.xchangr.MainActivity instance
│ Leaking: NO (Activity#mDestroyed is false)
│ ↓ MainActivity.mLifecycleRegistry
│ ~~~~~~~~~~~~~~~~~~
├─ androidx.lifecycle.LifecycleRegistry instance
│ Leaking: UNKNOWN
│ ↓ LifecycleRegistry.mObserverMap
│ ~~~~~~~~~~~~
├─ androidx.arch.core.internal.FastSafeIterableMap instance
│ Leaking: UNKNOWN
│ ↓ FastSafeIterableMap.mEnd
│ ~~~~
├─ androidx.arch.core.internal.SafeIterableMap$Entry instance
│ Leaking: UNKNOWN
│ ↓ SafeIterableMap$Entry.mKey
│ ~~~~
├─ br.com.simplepass.loadingbutton.customViews.CircularProgressButton instance
│ Leaking: YES (View detached and has parent)
│ mContext instance of app.xchangr.xchangr.MainActivity with mDestroyed = false
│ View#mParent is set
│ View#mAttachInfo is null (view detached)
│ View.mID = R.id.buttonRequestConnect
│ View.mWindowAttachCount = 1
│ ↓ CircularProgressButton.mParent
╰→ androidx.constraintlayout.widget.ConstraintLayout instance
​ Leaking: YES (ObjectWatcher was watching this because Fragment received Fragment#onDestroyView() callback (references to its views should be cleared to prevent leaks))
​ key = 01466f2b-0b53-4b23-bc09-80d260275b35
​ watchDurationMillis = 8923
​ retainedDurationMillis = 3919
​ key = 3a360067-4df8-48ec-a9a4-5cd12dce14d8
​ watchDurationMillis = 8924
​ retainedDurationMillis = 3921
​ mContext instance MainActivity with mDestroyed = false
​ View#mParent is null
​ View#mAttachInfo is null (view detached)
​ View.mWindowAttachCount = 1

METADATA

Build.VERSION.SDK_INT: 29
Build.MANUFACTURER: Google
LeakCanary version: 2.2

@jonbhanson jonbhanson changed the title Memory leak Memory leak on ver 2.2.0 Apr 27, 2020
@jmadaminov
Copy link

Hi, thanx for the great library, but I'm also having memory leak, any updates on this?

@MahdiNavidi
Copy link

MahdiNavidi commented Aug 23, 2022

hi
I had this problem too
this solution resolved my problem
#144 (comment)

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