AVPlayerViewController未解除分配/释放

时间:2016-04-09 12:20:07

标签: ios objective-c avplayer avplayerviewcontroller

当用户点击按钮时,我会显示如下的AVPlayerViewController:

self.playerViewController = [[AVPlayerViewController alloc] init];
self.playerViewController.player = [AVPlayer playerWithURL:url];
[self presentViewController:self.playerViewController animated:YES completion:^{
    [self.playerViewController.player play];
}];

属性playerViewController定义为:

@property (nonatomic, strong) AVPlayerViewController *playerViewController;

我注意到每次按下视图控制器中的按钮开始视频播放时,应用程序会消耗更多内存。在使用Instruments进行分析后,我看到AVPlayerViewController实例未被释放,例如在开始播放视频两次后,我看到了:

enter image description here

基础SDK:9.3 部署目标:8.3

0 个答案:

没有答案