Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ServiceConnection is leaked on Activity recreation #6

Open
khvMX opened this issue Dec 19, 2024 · 0 comments
Open

ServiceConnection is leaked on Activity recreation #6

khvMX opened this issue Dec 19, 2024 · 0 comments

Comments

@khvMX
Copy link

khvMX commented Dec 19, 2024

E  Activity global.covesa.sdk.client.MainActivity has leaked ServiceConnection global.covesa.sdk.api.client.CovesaServiceClient$remoteService$1$2@3d12740 that was originally bound here
  android.app.ServiceConnectionLeaked: Activity global.covesa.sdk.client.MainActivity has leaked ServiceConnection global.covesa.sdk.api.client.CovesaServiceClient$remoteService$1$2@3d12740 that was originally bound here
    ...
    at android.content.ContextWrapper.bindService(ContextWrapper.java:863)
    at global.covesa.sdk.api.client.CovesaServiceClient$remoteService$1.invokeSuspend(CovesaServiceClient.kt:57)
    at global.covesa.sdk.api.client.CovesaServiceClient$remoteService$1.invoke(Unknown Source:8)
    at global.covesa.sdk.api.client.CovesaServiceClient$remoteService$1.invoke(Unknown Source:4)
    ...

To reproduce: rotate the device. Activity is recreated, the leak happens.

How to solve: we must unbindService() in Activity onDestroy().

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant