Merge pull request #291 from Cordazar/bug/observers-not-deallocating

Added deallocation of observers
This commit is contained in:
Matt Apperson 2016-08-29 14:58:52 -04:00 committed by GitHub
commit 4e63dcbaae

View File

@ -126,6 +126,8 @@ static NSString *const playbackRate = @"rate";
- (void)dealloc - (void)dealloc
{ {
[[NSNotificationCenter defaultCenter] removeObserver:self]; [[NSNotificationCenter defaultCenter] removeObserver:self];
[self removePlayerItemObservers];
[_player removeObserver:self forKeyPath:playbackRate context:nil];
} }
#pragma mark - App lifecycle handlers #pragma mark - App lifecycle handlers