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

LeakCanary leak detection io.livekit.android.renderer.TextureViewRenderer #324

Open
serhiynovos opened this issue Nov 20, 2023 · 0 comments · May be fixed by #325
Open

LeakCanary leak detection io.livekit.android.renderer.TextureViewRenderer #324

serhiynovos opened this issue Nov 20, 2023 · 0 comments · May be fixed by #325
Labels
bug Something isn't working

Comments

@serhiynovos
Copy link

Issue: Memory Leak in TextureViewRenderer

Description

After conducting a video call in our application, we observed memory leaks being logged. The leak seems to be related to TextureViewRenderer instances, which are holding references to a destroyed activity. This issue was detected using LeakCanary.

LeakCanary Log

`
1 APPLICATION LEAKS

References underlined with "~~~" are likely causes.
Learn more at https://squ.re/leaks.

175409 bytes retained by leaking objects
Signature: da39a3ee5e6b4b0d3255bfef95601890afd80709
┬───
│ GC Root: Global variable in native code

├─ io.livekit.android.renderer.TextureViewRenderer instance
│ Leaking: YES (View.mContext references a destroyed activity)
│ Retaining 175.4 kB in 3367 objects
│ View not part of a window view hierarchy
│ View.mAttachInfo is null (view detached)
│ View.mWindowAttachCount = 1
│ mContext instance of [REDACTED].activities.CallActivity with mDestroyed = true
│ ↓ View.mContext
╰→ [REDACTED].activities.CallActivity instance
​ Leaking: YES (ObjectWatcher was watching this because [REDACTED].activities.CallActivity received
​ Activity#onDestroy() callback and Activity#mDestroyed is true)
​ Retaining 170.3 kB in 3321 objects
​ key = c5623187-0999-484e-bb56-5dc03dfebe9f
​ watchDurationMillis = 5285
​ retainedDurationMillis = 285
​ mApplication instance of [REDACTED].Application
​ mBase instance of android.app.ContextImpl`

@serhiynovos serhiynovos added the bug Something isn't working label Nov 20, 2023
@serhiynovos serhiynovos reopened this Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant