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

LoginRadiusAuthManager is leaking GoogleNativeActivity #8

Open
herrbert74 opened this issue Aug 15, 2023 · 0 comments
Open

LoginRadiusAuthManager is leaking GoogleNativeActivity #8

herrbert74 opened this issue Aug 15, 2023 · 0 comments

Comments

@herrbert74
Copy link

herrbert74 commented Aug 15, 2023

LoginRadiusAuthManager is leaking GoogleNativeActivity, because a lambda in GoogleNativeActivity is passed into a static field in LoginRadiusAuthManager.

LeakCanary trace:

 │ GC Root: Thread object
 │
 ├─ WV.mk instance
 │    Leaking: NO (PathClassLoader↓ is not leaking)
 │    Thread name: 'CleanupReference'
 │    ↓ Thread.contextClassLoader
 ├─ dalvik.system.PathClassLoader instance
 │    Leaking: NO (LoginRadiusAuthManager↓ is not leaking and A ClassLoader is never leaking)
 │    ↓ ClassLoader.runtimeInternalObjects
 ├─ java.lang.Object[] array
 │    Leaking: NO (LoginRadiusAuthManager↓ is not leaking)
 │    ↓ Object[4122]
 ├─ com.loginradius.androidsdk.helper.LoginRadiusAuthManager class
 │    Leaking: NO (a class is never leaking)
 │    ↓ static LoginRadiusAuthManager.asyncHandler
 │                                    ~~~~~~~~~~~~
 ├─ com.loginradius.androidsdk.activity.GoogleNativeActivity$1 instance
 │    Leaking: UNKNOWN
 │    Retaining 130.0 kB in 2246 objects
 │    Anonymous class implementing com.loginradius.androidsdk.handler.AsyncHandler
 │    this$0 instance of com.loginradius.androidsdk.activity.GoogleNativeActivity with mDestroyed = true
 │    ↓ GoogleNativeActivity$1.this$0
 │                             ~~~~~~
 ╰→ com.loginradius.androidsdk.activity.GoogleNativeActivity instance
 ​     Leaking: YES (ObjectWatcher was watching this because com.loginradius.androidsdk.activity.GoogleNativeActivity
 ​     received Activity#onDestroy() callback and Activity#mDestroyed is true)
 ​     Retaining 130.0 kB in 2245 objects
 ​     key = ab3eeedb-c14e-4363-aeb3-73543d89f968
 ​     watchDurationMillis = 7675
 ​     retainedDurationMillis = 2674
 ​     context instance of com.loginradius.androidsdk.activity.GoogleNativeActivity with mDestroyed = true
 ​     mApplication instance of com.mirror.news.MirrorApp
 ​     mBase instance of androidx.appcompat.view.ContextThemeWrapper

As a side note, the 5.0.0 Release Notes do not mention the change in the Maven group name (android to androidsdk), so it's not really easy to install. The installation section was also not updated with the new group name.

@herrbert74 herrbert74 changed the title LoginRadiusAuthManager leaking GoogleNativeActivity LoginRadiusAuthManager is leaking GoogleNativeActivity Aug 15, 2023
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

1 participant