The last frame received from the webcam was never released when closing the webcam, resulting in the described leak. Releasing this during webcam teardown fixed the problem.
Cancelling this 2023.2 tech release issue since the support for this release has come to end of life. Cancelling this 2023.2 port case does not affect any LTS or Unity 6 Beta/Preview that remain open.
How to reproduce:
1. Open the attached project "CameraOpenClose.zip"
2. Build And Run the project on HoloLens 2
3. Click on the "CameraOn" button
4. Click on the "CameraOFf" button
Expected results: Used memory has increased
Actual results: Used memory stays the same
Reproducible with: 2021.3.34f1, 2022.3.19f1, 2023.2.9f1
Could not test with: 2023.3.0b6 (Exception thrown when deployed on HL2)
Reproducible on: Windows 11 22H2
Not reproducible on: No other environment tested
Prioritise and Follow this issue
Have a workaround or additional info about this issue?