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 Leaks #169

Closed
Jean-BaptisteC opened this issue May 17, 2022 · 2 comments
Closed

Memory Leaks #169

Jean-BaptisteC opened this issue May 17, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@Jean-BaptisteC
Copy link
Contributor

Issue is for referenced memory leak

First leak:

┬───
│ GC Root: Global variable in native code
│
├─ android.graphics.animation.RenderNodeAnimator instance
│ Leaking: UNKNOWN
│ Retaining 196,9 kB in 4687 objects
│ mListeners[0] = android.graphics.drawable.RippleAnimationSession$3
│ ↓ RenderNodeAnimator.mTarget
│ ~~~~~~~
├─ android.graphics.RenderNode instance
│ Leaking: UNKNOWN
│ Retaining 194,7 kB in 4617 objects
│ ↓ RenderNode.mAnimationHost
│ ~~~~~~~~~~~~~~
├─ android.view.ViewAnimationHostBridge instance
│ Leaking: UNKNOWN
│ Retaining 194,7 kB in 4616 objects
│ ↓ ViewAnimationHostBridge.mView
│ ~~~~~
├─ androidx.appcompat.widget.AppCompatImageButton instance
│ Leaking: UNKNOWN
│ Retaining 194,7 kB in 4615 objects
│ View not part of a window view hierarchy
│ View.mAttachInfo is null (view detached)
│ View.mWindowAttachCount = 1
│ mContext instance of dagger.hilt.android.internal.managers.
│ ViewComponentManager$FragmentContextWrapper, wrapping activity org.eu.
│ exodus_privacy.exodusprivacy.MainActivity with mDestroyed = false
│ ↓ View.mParent
│ ~~~~~~~
├─ com.google.android.material.appbar.MaterialToolbar instance
│ Leaking: UNKNOWN
│ Retaining 21,6 kB in 504 objects
│ View not part of a window view hierarchy
│ View.mAttachInfo is null (view detached)
│ View.mID = R.id.toolbar
│ View.mWindowAttachCount = 1
│ mPopupContext instance of dagger.hilt.android.internal.managers.
│ ViewComponentManager$FragmentContextWrapper, wrapping activity org.eu.
│ exodus_privacy.exodusprivacy.MainActivity with mDestroyed = false
│ mContext instance of dagger.hilt.android.internal.managers.
│ ViewComponentManager$FragmentContextWrapper, wrapping activity org.eu.
│ exodus_privacy.exodusprivacy.MainActivity with mDestroyed = false
│ ↓ View.mParent
│ ~~~~~~~
╰→ android.widget.RelativeLayout instance
Leaking: YES (ObjectWatcher was watching this because org.eu.
exodus_privacy.exodusprivacy.fragments.appdetail.AppDetailFragment
received Fragment#onDestroyView() callback (references to its views
should be cleared to prevent leaks))
Retaining 161,6 kB in 3727 objects
key = 1ca49ad1-688f-42af-83af-f4b1e0af72f7
watchDurationMillis = 5563
retainedDurationMillis = 561
View not part of a window view hierarchy
View.mAttachInfo is null (view detached)
View.mWindowAttachCount = 1
mContext instance of dagger.hilt.android.internal.managers.
ViewComponentManager$FragmentContextWrapper, wrapping activity org.eu.
exodus_privacy.exodusprivacy.MainActivity with mDestroyed = false
METADATA
Build.VERSION.SDK_INT: 32
Build.MANUFACTURER: Google
LeakCanary version: 2.9.1
App process name: org.eu.exodus_privacy.exodusprivacy
Class count: 23602
Instance count: 232584
Primitive array count: 143173
Object array count: 29681
Thread count: 23
Heap total bytes: 35430388
Bitmap count: 177
Bitmap total bytes: 44892213
Large bitmap count: 0
Large bitmap total bytes: 0
Db 1: open /data/user/0/org.eu.exodus_privacy.
exodusprivacy/databases/exodus_database
Count of retained yet cleared: 6 KeyedWeakReference instances
Stats: LruCache[maxSize=3000,hits=119427,misses=209669,hitRate=36%]
RandomAccess[bytes=18918908,reads=209669,travel=102261588770,range=41737873,size
=48987152]
Analysis duration: 21686 ms
@Jean-BaptisteC Jean-BaptisteC added enhancement New feature or request rewrite labels May 17, 2022
@theimpulson
Copy link
Contributor

For the reminder, this is being caused by the following piece of code in the fragment:

       binding.toolbarAD.setNavigationOnClickListener {
            view.findNavController().navigateUp()
        }

Might be related to google/dagger#2070 though unsure. Ignoring this for now as I find myself unable to fix it.

@Jean-BaptisteC
Copy link
Contributor Author

No new leaks detected for now with Leaks Canary.

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

No branches or pull requests

2 participants