Bug 222898 - getUserMedia memory leak when switching camera
Summary: getUserMedia memory leak when switching camera
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad iOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-07 23:54 PST by Darius
Modified: 2021-07-31 01:07 PDT (History)
3 users (show)

See Also:


Attachments
Memory timeline recording (449.37 KB, image/png)
2021-03-07 23:54 PST, Darius
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Darius 2021-03-07 23:54:45 PST
Created attachment 422547 [details]
Memory timeline recording

Releasing an old media stream and getting a new media stream with a different camera seems to leak memory, though not for every switch, or to the same extent on every website. You can see in the attached image my reproduction on https://webrtc.github.io/samples/src/content/devices/input-output/ - the memory use for 'Pages' doubles as I continually switch between front and back camera, and after I stop switching at around 160s, does not ever go back down. On more complex Angular/React websites with a higher memory footprint, a single switch is even causing some devices to reload the page and produce a jetsam event. Let me know if there are any more details I can provide to help.
Comment 1 Radar WebKit Bug Importer 2021-03-08 00:41:00 PST
<rdar://problem/75160959>
Comment 2 youenn fablet 2021-03-08 00:41:34 PST
Thanks for the report, which iOS version are you using?
Comment 3 Darius 2021-03-08 05:17:13 PST
This was on iOS 14.4