Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1367)

Issue 3013023002: Fix retain cycles in RTCUIApplicationStatusObserver. (Closed)

Created:
3 years, 3 months ago by andersc
Modified:
3 years, 3 months ago
Reviewers:
kthelgason, Chuck
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Fix retain cycles in RTCUIApplicationStatusObserver. These retain cycles are theoretical since the singleton is supposed to live for the lifetime of the application. These measures were removed earlier when the object was turned into a singleton in a previous CL, see https://chromium-review.googlesource.com/c/external/webrtc/+/527442/3..4/webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m The weak self handling and unused dealloc method is mostly noise and can make a casual reader think that the object will have a limited life cycle, i.e. the code may initially look like something it is not, which could possibly be less readable. On the other hand, for people looking out for potential retain cycles, the code may be distracting since it looks like it may be leaking. BUG=b/65558647 Review-Url: https://codereview.webrtc.org/3013023002 Cr-Commit-Position: refs/heads/master@{#19811} Committed: https://chromium.googlesource.com/external/webrtc/+/4090f380e58beb4e192691ca50643eef3aadd25d

Patch Set 1 #

Total comments: 2

Patch Set 2 : Reference weak self in initialization block. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -15 lines) Patch
M webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m View 1 3 chunks +37 lines, -15 lines 0 comments Download

Messages

Total messages: 21 (12 generated)
Chuck
https://codereview.webrtc.org/3013023002/diff/1/webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m File webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m (right): https://codereview.webrtc.org/3013023002/diff/1/webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m#newcode68 webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m:68: _state = [UIApplication sharedApplication].applicationState; This and _initialized both have ...
3 years, 3 months ago (2017-09-12 13:25:51 UTC) #7
andersc
https://codereview.webrtc.org/3013023002/diff/1/webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m File webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m (right): https://codereview.webrtc.org/3013023002/diff/1/webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m#newcode68 webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m:68: _state = [UIApplication sharedApplication].applicationState; On 2017/09/12 13:25:51, Chuck wrote: ...
3 years, 3 months ago (2017-09-12 13:43:41 UTC) #8
Chuck
lgtm
3 years, 3 months ago (2017-09-12 15:13:37 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/3013023002/20001
3 years, 3 months ago (2017-09-13 07:32:43 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/21523)
3 years, 3 months ago (2017-09-13 07:38:14 UTC) #13
andersc
kthelgason - please take a look (added to get owners coverage)
3 years, 3 months ago (2017-09-13 08:20:08 UTC) #15
kthelgason
On 2017/09/13 08:20:08, andersc wrote: > kthelgason - please take a look (added to get ...
3 years, 3 months ago (2017-09-13 08:25:19 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/3013023002/20001
3 years, 3 months ago (2017-09-13 08:48:28 UTC) #18
commit-bot: I haz the power
3 years, 3 months ago (2017-09-13 09:18:42 UTC) #21
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/external/webrtc/+/4090f380e58beb4e192691ca5...

Powered by Google App Engine
This is Rietveld 408576698