ios - 仪器在 main.m 中显示泄漏(Xcode 4.3.1)

标签 ios memory-leaks instruments

我正在使用 ARC 开发应用 在仪器中分析我的应用程序是否存在内存泄漏时,它显示了以下函数的泄漏:

#import <UIKit/UIKit.h>

#import "AppDelegate.h"

int main(int argc, char *argv[])

{
    @autoreleasepool { 
       return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}

这是否表明我的代码中的其他地方存在问题?

这是堆栈跟踪

   0 libsystem_c.dylib malloc
   1 libsystem_c.dylib strdup
   2 libnotify_sim.dylib token_table_add
   3 libnotify_sim.dylib notify_register_mach_port
   4 libnotify_sim.dylib notify_register_dispatch
   5 CoreFoundation _CFXNotificationRegisterObserver
   6 CoreFoundation CFNotificationCenterAddObserver
   7 UIKit -[UIScrollView(Static) _startTimer:]
   8 UIKit -[UIScrollView _endPanWithEvent:]
   9 UIKit -[UIScrollView handlePan:]
  10 UIKit _UIGestureRecognizerSendActions
  11 UIKit -[UIGestureRecognizer _updateGestureWithEvent:]
  12 UIKit -[UIGestureRecognizer _delayedUpdateGesture]
  13 UIKit ___UIGestureRecognizerUpdate_block_invoke_0541



14 UIKit _UIGestureRecognizerApplyBlocksToArray
  15 UIKit _UIGestureRecognizerUpdate
  16 UIKit -[UIWindow _sendGesturesForEvent:]
  17 UIKit -[UIWindow sendEvent:]
  18 UIKit -[UIApplication sendEvent:]
  19 UIKit _UIApplicationHandleEvent
  20 GraphicsServices PurpleEventCallback
  21 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
  22 CoreFoundation __CFRunLoopDoSource1
  23 CoreFoundation __CFRunLoopRun
  24 CoreFoundation CFRunLoopRunSpecific
  25 CoreFoundation CFRunLoopRunInMode
  26 GraphicsServices GSEventRunModal
  27 GraphicsServices GSEventRun
  28 UIKit UIApplicationMain
  29 MyProject/main.m:16
  30 MyProject start

最佳答案

貌似是iOS 5.1框架的bug: https://devforums.apple.com/message/630695

关于ios - 仪器在 main.m 中显示泄漏(Xcode 4.3.1),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9757956/

相关文章:

ios - 上传IPA,奇怪的问题: ERROR ITMS-90032 :“Invalid Image Path - No image found at the path referenced under key ' $key': '$path'

android - React Native Android App 中 TextInput 下的意外行

c++ - VirtualTreeView 在 C++ Builder 中完成 UnicodeString

xcode - 仪器 4.5 和 ios 模拟器 6.0。没有开始

iphone - iOS 应用程序中的内存泄漏 - ARC

iphone - UIAutomation 脚本示例

ios - 服务器运行 SVN 1.6,客户端运行 SVN 1.7

ios - 如何让 viewController 始终保持纵向模式,iOS?

java - Eclipse MAT 显示许多线程没有堆栈

visual-studio - 什么是 [Cycle Detected] 内存泄漏?