You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I encountered huge memory leaks (around 50MB) when I attempted to publish -> unpublish camera tracks several times.
SDK Version
2.0.11
iOS Version
Tested on iOS 17 and iOS 15
Xcode Version
Version 15.4 (15F31d)
Swift version: Apple Swift version 5.10
Steps to Reproduce
Demo Application
I created a demo application (two simple screens) where the microphone and camera are enabled/disabled by publishing/unpublishing new tracks. I used this approach and not the canonical one (with track unmute/mute) to highlight the memory leaks problem.
The problem can be replicated by turning the camera on/off multiple times. On every camera switch the memory will increase significantly.
Login into your room using the form found on the Login Screen (you can hardcode the room URL and Token by modifying the values of defaultServerURL and defaultToken constants that can be found at LiveKit-Playground/Utils/Constants.swift )
After you log in with success the Conference Screen will appear and then you should enable -> disable camera by using the Camera toggle button
On every enable -> disable repetition you will see that memory increases drastically see
Repeat steps 2 and then 3 several times and you will see that memory increases with every repetition
An important thing to notice is that the following room's option changes increased the amount of leaked memory
from 3 - 4MB to 50MB: VatamanuBogdan/livekit.playground@d16c937
Expected behavior
After the camera track unpublish the memory should decrease but it remains the same.
Screenshots
Application Screens
Login Screen
Conference Screen
Memory Usage
Every memory increase represents a camera enabling.
The text was updated successfully, but these errors were encountered:
Describe the bug
I encountered huge memory leaks (around 50MB) when I attempted to publish -> unpublish camera tracks several times.
SDK Version
2.0.11
iOS Version
Tested on iOS 17 and iOS 15
Xcode Version
Version 15.4 (15F31d)
Swift version: Apple Swift version 5.10
Steps to Reproduce
Demo Application
I created a demo application (two simple screens) where the microphone and camera are enabled/disabled by publishing/unpublishing new tracks. I used this approach and not the canonical one (with track unmute/mute) to highlight the memory leaks problem.
The problem can be replicated by turning the camera on/off multiple times. On every camera switch the memory will increase significantly.
Demo Repository: https://github.com/VatamanuBogdan/livekit.playground/tree/master
Commit: d1c2b043d375a44a63e0df373e531e9dc02cefcd
Steps:
The entire camera-enabling logic is placed inside ConferenceScreenViewModel.setCamera method.
Code
ConnectOptions
RoomOptions
An important thing to notice is that the following room's option changes increased the amount of leaked memory
from 3 - 4MB to 50MB: VatamanuBogdan/livekit.playground@d16c937
Expected behavior
After the camera track unpublish the memory should decrease but it remains the same.
Screenshots
Application Screens
Memory Usage
Every memory increase represents a camera enabling.
The text was updated successfully, but these errors were encountered: