Fix memory leak when using AVPlayerViewController, make sure to release player

This commit is contained in:
Jens Andersson 2019-07-03 08:44:55 +02:00
parent 3a7be63de3
commit 3d2a58a8c5

View File

@ -1491,6 +1491,8 @@ static int const RCTVideoUnset = -1;
[_playerViewController.contentOverlayView removeObserver:self forKeyPath:@"frame"];
[_playerViewController removeObserver:self forKeyPath:readyForDisplayKeyPath];
[_playerViewController.view removeFromSuperview];
_playerViewController.rctDelegate = nil;
_playerViewController.player = nil;
_playerViewController = nil;
[self removePlayerTimeObserver];