livekit / client-sdk-android

LiveKit SDK for Android
https://docs.livekit.io
Apache License 2.0
165 stars 64 forks source link

Fixed memory leak - LeakCanary leak detection io.livekit.android.rend… #325

Open serhiynovos opened 8 months ago

serhiynovos commented 8 months ago

I noticed that sometimes when my app leaves a call, LeakCanary shows that memory leak is detected. After these changes I stopped seeing this message

This PR should fix #324 issue

serhiynovos commented 8 months ago

@davidliu I'm thinking if it could not be issue of random crashes on peerConnection dispose as looks like it had references to tracks and some native memory may leak which could case that something wanted to access peerconneection which was not in memory anymore