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

AdbControllerImp leaks via ADB device listener #46

Open
npaige opened this issue Feb 26, 2024 · 0 comments
Open

AdbControllerImp leaks via ADB device listener #46

npaige opened this issue Feb 26, 2024 · 0 comments

Comments

@npaige
Copy link

npaige commented Feb 26, 2024

We've seen the following leak in diagnostic reports from Android Studio users:

 1.19G        1 ROOT: Static field: com.android.ddmlib.AndroidDebugBridge.sDeviceListeners
 1.19G        1 (root): java.util.concurrent.CopyOnWriteArraySet
 1.19G        1 al: java.util.concurrent.CopyOnWriteArrayList
 1.19G        1 array: java.lang.Object[]
 1.19G        6 []: spock.adb.AdbControllerImp
 472M        5 project: com.intellij.openapi.project.impl.ProjectImpl (disposed)

It looks like AdbControllerImp adds itself as a device change listener and never unregisters itself (except for refresh(), where it immediately re-registers itself). This references stale projects and other large data structures, keeping them in memory indefinitely.

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