Fix leak of UIComputerViews that poll forever
This commit is contained in:
parent
3555d60a9b
commit
dc00c1e3e7
1 changed files with 5 additions and 1 deletions
|
|
@ -183,7 +183,11 @@ static const int LABEL_DY = 20;
|
|||
|
||||
- (void) updateLoop {
|
||||
[self updateContentsForHost:_host];
|
||||
[self performSelector:@selector(updateLoop) withObject:self afterDelay:REFRESH_CYCLE];
|
||||
|
||||
// Stop updating when we detach from our parent view
|
||||
if (self.superview != nil) {
|
||||
[self performSelector:@selector(updateLoop) withObject:self afterDelay:REFRESH_CYCLE];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) hostLongClicked:(UILongPressGestureRecognizer*)gesture {
|
||||
|
|
|
|||
Loading…
Reference in a new issue