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

Side by Side Diff: remoting/ios/app/host_view_controller.mm

Issue 2886233003: [CRD iOS] Fix the leaky RemotingClient (Closed)
Patch Set: WIP Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | remoting/ios/app/remoting_view_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if !defined(__has_feature) || !__has_feature(objc_arc) 5 #if !defined(__has_feature) || !__has_feature(objc_arc)
6 #error "This file requires ARC support." 6 #error "This file requires ARC support."
7 #endif 7 #endif
8 8
9 #import "remoting/ios/app/host_view_controller.h" 9 #import "remoting/ios/app/host_view_controller.h"
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 addObserver:self 104 addObserver:self
105 selector:@selector(keyboardWillHide:) 105 selector:@selector(keyboardWillHide:)
106 name:UIKeyboardWillHideNotification 106 name:UIKeyboardWillHideNotification
107 object:nil]; 107 object:nil];
108 } 108 }
109 109
110 - (void)viewWillDisappear:(BOOL)animated { 110 - (void)viewWillDisappear:(BOOL)animated {
111 [super viewWillDisappear:animated]; 111 [super viewWillDisappear:animated];
112 112
113 _clientGestures = nil; 113 _clientGestures = nil;
114 _client = nil;
114 [[NSNotificationCenter defaultCenter] removeObserver:self]; 115 [[NSNotificationCenter defaultCenter] removeObserver:self];
115 } 116 }
116 117
117 - (void)viewDidLayoutSubviews { 118 - (void)viewDidLayoutSubviews {
118 [super viewDidLayoutSubviews]; 119 [super viewDidLayoutSubviews];
119 120
120 if (((GLKView*)self.view).context != nil) { 121 if (((GLKView*)self.view).context != nil) {
121 // If the context is not set yet, the view size will be set in 122 // If the context is not set yet, the view size will be set in
122 // viewDidAppear. 123 // viewDidAppear.
123 [_client surfaceChanged:self.view.bounds]; 124 [_client surfaceChanged:self.view.bounds];
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 [self dismissViewControllerAnimated:YES completion:nil]; 216 [self dismissViewControllerAnimated:YES completion:nil];
216 }; 217 };
217 [alert addAction:[UIAlertAction actionWithTitle:@"Disconnect" 218 [alert addAction:[UIAlertAction actionWithTitle:@"Disconnect"
218 style:UIAlertActionStyleCancel 219 style:UIAlertActionStyleCancel
219 handler:disconnectHandler]]; 220 handler:disconnectHandler]];
220 221
221 [self presentViewController:alert animated:YES completion:nil]; 222 [self presentViewController:alert animated:YES completion:nil];
222 } 223 }
223 224
224 @end 225 @end
OLDNEW
« no previous file with comments | « no previous file | remoting/ios/app/remoting_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698