I used the AVPlayerDemo sample from the Apple docs and wrote my own UI on top of it to play videos selected from a UITableViewController. Now, the problem is that there\'s a mem
I had the same issue as you, but I managed to fix the memory leak by calling this on viewDidDisappear:
viewDidDisappear
self.avPlayer?.replaceCurrentItem(with: nil)