Added deallocation of observers to prevent an NSInternalInconsistencyException.

This commit is contained in:
Ricard Fredin 2016-08-04 14:32:04 +02:00
parent b6c9a57ff2
commit b15594e90a

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