diff --git a/Tusker/Screens/Gallery/VideoControlsViewController.swift b/Tusker/Screens/Gallery/VideoControlsViewController.swift index a7eac5bf3a..f99b52fd3e 100644 --- a/Tusker/Screens/Gallery/VideoControlsViewController.swift +++ b/Tusker/Screens/Gallery/VideoControlsViewController.swift @@ -120,6 +120,15 @@ class VideoControlsViewController: UIViewController { fatalError("init(coder:) has not been implemented") } + deinit { + if let timestampObserverToken { + player.removeTimeObserver(timestampObserverToken) + } + if let scrubberObserverToken { + player.removeTimeObserver(scrubberObserverToken) + } + } + override func viewDidLoad() { super.viewDidLoad()