fix: memory deallocation (iOS)
This commit is contained in:
parent
1e9199bb36
commit
9a9241b9c9
|
@ -58,6 +58,13 @@ class TransparentVideoView : UIView {
|
|||
loadItem(url: itemUrl)
|
||||
}
|
||||
|
||||
deinit {
|
||||
playerView?.player?.pause()
|
||||
playerView?.player?.replaceCurrentItem(with: nil)
|
||||
playerView?.removeFromSuperview()
|
||||
playerView = nil
|
||||
}
|
||||
|
||||
// MARK: - Player Item Configuration
|
||||
|
||||
private func loadItem(url: URL) {
|
||||
|
|
Loading…
Reference in New Issue