Bug 1518744 - Deregister owner in DeviceInfoIos destructor. r=jib, a=RyanVM
authorDan Minor <dminor@mozilla.com>
Wed, 09 Jan 2019 09:22:27 -0500
changeset 506647 c0445e5ce38871a960e29fa97a6992df24b0bd50
parent 506646 b295af2ecf44a671a7802d6de183a7a5a03c259d
child 506648 5bd8d895c5e5ae81f0852db02cc930c2c9ada6b8
push id10497
push userryanvm@gmail.com
push dateSat, 12 Jan 2019 18:08:31 +0000
treeherdermozilla-beta@c0445e5ce388 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib, RyanVM
bugs1518744
milestone65.0
Bug 1518744 - Deregister owner in DeviceInfoIos destructor. r=jib, a=RyanVM 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];