Clean up better after ourselves

This commit is contained in:
Brent Vatne 2015-04-07 10:41:34 -07:00
parent 90a0f85cf9
commit d9ddb6e75a

View File

@ -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];
}