Clean up better after ourselves
This commit is contained in:
parent
90a0f85cf9
commit
d9ddb6e75a
@ -140,9 +140,14 @@
|
||||
_playerLayer.frame = self.bounds;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
- (void)removeFromSuperview
|
||||
{
|
||||
[_player pause];
|
||||
[_progressUpdateTimer invalidate];
|
||||
[_playerLayer removeFromSuperlayer];
|
||||
_player = nil;
|
||||
_prevProgressUpdateTime = nil;
|
||||
_eventDispatcher = nil;
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user