I tried your code, the problem is that even if you call [TestAVPlayer playerWithPlayerItem:item] , the TestAVPlayer class TestAVPlayer not have such a method, so it calls the playerWithPlayerItem: function from the AVPlayer base class, which will return an instance of the AVPlayer class instead of the TestAVPlayer class. The compiler will not give you any warnings, because the playerWithPlayerItem: method returns an id type. If you check this with the debugger, you will see that the type of the private variable is not TestAVPlayer:

dealloc TestAVPlayer will never be called because no such object was created. The AVPlayer instance is freed when the TestViewController freed. You can check this with the tools or just add a Symbolic breakpoint in [AVPlayer dealloc] .
Select the breakpoint navigator and click the + button and add a Symbolic breakpoint.

Type [AVPlayer dealloc] in the Symbol field and press Enter. When you start the application, and TestViewController gets released, you will see that the breakpoint is deleted, so AVPlayer really freed.

source share