当我试图测试应用程序时,仪器中的内存泄漏。在应用程序中,当我在UIWebView中测试youtube视频时,它显示了libsystem_c.dylib中的malloc内存泄漏,负责的framse显示为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
任何人都可以知道泄漏的原因和原因。
感谢。
答案 0 :(得分:0)
尝试使用谷歌搜索类似的问题?我刚刚做了,我发现了这个:
iOS libsystem_c.dylib strdup memory leak NSZombie not working
总而言之,它可能是您不负责的库中的泄漏。如果是这种情况,并且这是一个微小的一次性泄漏,请不要冒汗。