Search This Blog

Sunday, August 1, 2010

MPMoviePlayerController still leaking

Programmer Question

I release the MPMoviePlayerController but the memory allocation and the living objects are sill higher than before the object allocation. However if i reallocate the object it doesn't leak more.
My application actually uses alot of media files and the memory consumption it's high. I would like to free up completely the unneeded memory to avoid memory warnings.



Movie player release:



        player.initialPlaybackTime = -1;
[player.view removeFromSuperview];
[player stop];
[player release];


Movie player alloc:



    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];


Find the answer here

No comments:

Post a Comment

Related Posts with Thumbnails