Closed Bug 1802872 Opened 3 years ago Closed 3 years ago

A reference cycle prevents DeviceInfoIosObjc from being dealloced

Categories

(Core :: WebRTC: Audio/Video, defect, P3)

defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

Details

Attachments

(1 file)

The notification handlers that DeviceInfoIosObjc registers with NotificationCenter hold references to members of DeviceInfoIosObjc itself, preventing it from being dealloced, since it is compiled with ARC.

This patch unbreaks a ref-cycle preventing instances of DeviceInfoIosObjc from
being dealloced. To achieve this it ties the lifetime of the underlying
devicechange notifications to whether an owner is registered or not. The
notification handlers are what is holding the ref that causes the cycle, and
they do nothing unless an owner is registered.

Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/720869457b51 Tie Mac camera devicechange notification lifetimes to owner registration. r=webrtc-reviewers,jib
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: