diff --git a/RCTVideo.m b/RCTVideo.m index 175ae2f5..f4df2bf1 100644 --- a/RCTVideo.m +++ b/RCTVideo.m @@ -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]; }