2012-08-17 68 views
1

當我嘗試測試應用程序時,在儀器中獲取內存泄漏。在應用程序中,當我在UIWebView中測試YouTube視頻時,它顯示libsystem_c.dylib中的malloc內存泄漏,負責顯示的是strdup。libsystem_c.dylib中的內存泄漏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

嘗試谷歌搜索類似的問題?我只是做了,我發現這一點:

iOS libsystem_c.dylib strdup memory leak NSZombie not working

總之,它可能是在庫泄露你不負責。如果是這樣的話,這是一次小小的一次性泄漏,請不要冒汗。

+0

只要它開始播放YouTube視頻,它顯示了我在樂器中的這種泄漏。它是malloc 48bytes – user1452248 2012-08-17 16:35:36