I am writing a wrapper over AVPlayer(say 'MyPlayer') and I have everything in control.I am adding observers on playerItem and MyPlayer.This is what happens:
SomeViewController.swift
let player_ = Myplayer.player()
player_!.delegate = self
player_!.setItemWithUrl(url_!)
So it creates an instance of MyPlayer and observers are registered with currentplayerItem and player_.
The problem is : When I set player_ to nil,'deinit' does not get called in 'MyPlayer.swift'.What could be the problem?