Bug 1518744 - Deregister owner in DeviceInfoIos destructor; r=jib
authorDan Minor <dminor@mozilla.com>
Wed, 09 Jan 2019 09:22:27 -0500
changeset 510200 998ab57c13668895fc962260071b714cce36efdd
parent 510199 763f90cc2fac67d6c5598df0fc3af3a335680382
child 510201 89ca00a3e30767aaf57562ac8c2e2b3994123de3
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1518744
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1518744 - Deregister owner in DeviceInfoIos destructor; r=jib Differential Revision: https://phabricator.services.mozilla.com/D16047
media/webrtc/trunk/webrtc/modules/video_capture/objc/device_info.mm
--- a/media/webrtc/trunk/webrtc/modules/video_capture/objc/device_info.mm
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/objc/device_info.mm
@@ -37,17 +37,19 @@ static NSArray* camera_presets = @[
 VideoCaptureModule::DeviceInfo* VideoCaptureImpl::CreateDeviceInfo() {
   return new DeviceInfoIos();
 }
 
 DeviceInfoIos::DeviceInfoIos() {
   this->Init();
 }
 
-DeviceInfoIos::~DeviceInfoIos() {}
+DeviceInfoIos::~DeviceInfoIos() {
+  [_captureInfo registerOwner:nil];
+}
 
 int32_t DeviceInfoIos::Init() {
   _captureInfo = [[DeviceInfoIosObjC alloc] init];
   [_captureInfo registerOwner:this];
 
   // Fill in all device capabilities.
   int deviceCount = [DeviceInfoIosObjC captureDeviceCount];