このコードがリリースプールのどこかでクラッシュしている理由を誰かが知っていますか(「eject」が呼び出された後)?AVPlayerクラスリファレンスで、「currentItem」プロパティが「retain」として宣言されていないことがわかりました。http://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVPlayer_Class/Reference/Reference.html#//apple_ref / doc / uid / TP40009530-CH1-SW21
AVPlayerクラスのバグですか、それとも別の場所に保持する必要がありますか?
ありがとう!
- (void) viewDidLoad {
NSURL *url = [NSURL URLWithString:@"http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"];
playerItem = [[AVPlayerItem alloc] initWithURL:url];
player = [[AVPlayer alloc] initWithPlayerItem:playerItem];
}
- (IBAction) eject {
[player release];
[playerItem release];
}