当我尝试测试应用程序时,仪器出现内存泄漏。在应用程序中,当我在 UIWebView 中测试 youtube 视频时,它显示 libsystem_c.dylib 中的 malloc 内存泄漏,负责的帧显示是 strdup。
-(void)LaunchVideo:(id)sender
{
self.videoURL = @"http://www.youtube.com/embed/0Xa4bHcJu8";
//VideoViewController *videoViewController = [[[VideoViewController alloc] initWithNibName:nil bundle:nil] retain];
VideoViewController *videoViewController = [[VideoViewController alloc] init];
videoViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
videoViewController.videoURL = self.videoURL;
[self presentModalViewController:videoViewController animated:YES];
[videoViewController release];
}
编辑:
下面是堆栈跟踪:
0 libsystem_c.dylib malloc
1 libsystem_c.dylib strdup
2 libnotify.dylib token_table_add
3 libnotify.dylib notify_register_check
4 AVFoundation -[AVPlayer(AVPlayerMultitaskSupport) _iapdExtendedModeIsActive]
6 AVFoundation -[AVQueuePlayer init]
7 MediaPlayer -[MPQueuePlayer init]
23 MediaPlayer -[UIMoviePlayerController setAutoRotationMask:]
24 QuickTime Plugin 0x89473ce
27 QuickTime Plugin 0x894f3bc
28 libdispatch.dylib _dispatch_call_block_and_release
29 libdispatch.dylib _dispatch_main_queue_callback_4CF$VARIANT$mp
30 CoreFoundation __CFRunLoopRun
32 CoreFoundation CFRunLoopRunInMode
33 GraphicsServices GSEventRunModal
34 UIKit UIApplicationMain
任何人都可以说出泄漏的原因和原因。
谢谢。