【发布时间】:2011-03-23 23:59:47
【问题描述】:
我释放了 MPMoviePlayerController 但内存分配和活动对象仍然高于对象分配之前。但是,如果我重新分配对象,它不会泄漏更多。 我的应用程序实际上使用了很多媒体文件并且内存消耗很高。我想完全释放不需要的内存以避免内存警告。
电影播放器发布:
player.initialPlaybackTime = -1;
[player.view removeFromSuperview];
[player stop];
[player release];
电影播放器分配:
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"video0_hd.mov" ofType:nil]];
player = [[MPMoviePlayerController alloc] initWithContentURL:url];
player.view.frame = placeholder.frame;
[self.view addSubview:player.view];
[player play];
【问题讨论】:
标签: iphone ios memory-management memory-leaks mpmovieplayercontroller