Shadow
Shadow copied to clipboard
Activity bindService 时Activity会在destroy后内存泄露
执行全量自动化测试时dump内存,发现Activity内存泄露。
由于ServiceContextSubDirTestActivity的ServiceConnection被com.tencent.shadow.core.loader.managers.UnsafePluginServiceManager#mConnectionIntentMap 持有。
https://github.com/Tencent/Shadow/blob/e38755ec8fb77adfb5e7e96d8631dd04a1626422/projects/test/plugin/general-cases/test-plugin-general-cases/src/main/java/com/tencent/shadow/test/plugin/general_cases/lib/usecases/context/ServiceContextSubDirTestActivity.java#L44
https://github.com/Tencent/Shadow/blob/9f0c762d5c11afb48e088be1f0c3abe3d6f1da1c/projects/sdk/core/loader/src/main/kotlin/com/tencent/shadow/core/loader/managers/PluginServiceManager.kt#L95