Merge pull request #1647 from jenshandersson/master

Fix memory leak on iOS when using `controls` (AVPlayerViewController)
This commit is contained in:
Daniel Mariño Ruiz 2019-07-04 10:06:13 +02:00 committed by GitHub
commit 1433d16ec2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,7 @@
## Changelog ## Changelog
### Version 4.4.3 ### Version 4.4.3
* Fixed memory leak on iOS when using `controls` [#1647](https://github.com/react-native-community/react-native-video/pull/1647)
* (Android) Update gradle and target SDK [#1629](https://github.com/react-native-community/react-native-video/pull/1629) * (Android) Update gradle and target SDK [#1629](https://github.com/react-native-community/react-native-video/pull/1629)
* Fix iOS stressed mount/unmount crash [#1646](https://github.com/react-native-community/react-native-video/pull/1646) * Fix iOS stressed mount/unmount crash [#1646](https://github.com/react-native-community/react-native-video/pull/1646)

View File

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