title: MPMoviePlayerController causing leak
body: <p>I am developing a very video heavy iPad only iOS app which uses ARC but it appears that I have a leak when I try using MPMoviePlayerController, instruments throws a memory leak on the line of code that allocates the memory for the video player object, any ideas? also the clean up of the video player doesn't seem to be happening when the videos completes playback.</p>
  
  <p>Any help would be very much appreciated, been looking everywhere for an answer for this as you can tell the problem is very much an show stopper with the nature of the application.</p>
  
  <p>the code: </p>
  
  <pre><code>@interface ViewController ()
  @property(nonatomic,strong) MPMoviePlayerController * vidPlayer;
  @end
  
  @implementation ViewController
  @synthesize vidPlayer;
  
  - (void)viewDidLoad
      {
          @autoreleasepool {
  
          [super viewDidLoad];
          // Do any additional setup after loading the view, typically from a nib.
          [self playVideoForFile:@"01_intro"];
          }
      }
  
      -(void)playVideoForFile:(NSString*)p_fileName
      {    
              NSString *path = [[NSBundle mainBundle] pathForResource:p_fileName ofType:@"mp4"];
              NSURL *tempURI = [NSURL fileURLWithPath:path];
              vidPlayer = [[MPMoviePlayerController alloc] initWithContentURL:tempURI];
  
          [vidPlayer setControlStyle:MPMovieControlStyleNone];
          [vidPlayer setAllowsAirPlay:NO];
  
          [vidPlayer.view setFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.height,[[UIScreen mainScreen] bounds].size.width)];
  
  
          [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(vidFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:vidPlayer];
  
          [vidPlayer play];
  
          [self.view addSubview:vidPlayer.view];
  
  }
  
  -(void)vidFinishedCallback:(NSNotification*)aNotification
  {       
              [vidPlayer pause];
              vidPlayer.initialPlaybackTime = -1;
              [vidPlayer stop];
              vidPlayer.initialPlaybackTime = -1;
              [vidPlayer.view removeFromSuperview];
              vidPlayer = nil;
  
          [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:vidPlayer];
  
  
  }
  </code></pre>