Obj-C:strdup帧中Malloc 48字节的内存泄漏 [英] Obj-C: Memory Leak of Malloc 48 bytes in strdup frame

查看:83
本文介绍了Obj-C:strdup帧中Malloc 48字节的内存泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用中,我收到多个内存泄漏.该对象是Malloc 48字节,它始终源自负责的调用方strdup.对象的历史记录仅显示该对象已被M分配,而没有其他保留或释放. stacktrace不显示任何我的代码.我唯一可以选择的相关内容是:

In my app, I have am receiving multiple memory leaks. The object is Malloc 48 bytes, and it always originates from the responsible caller strdup. The history of the object only shows it being Malloced, and no other retains or releases. The stacktrace doesn't show any of my code. The only bits of relevance that I can pick out are:

  10 UIKit _UIGestureRecognizerSendActions
   9 UIKit -[UIScrollView handlePan:]
   8 UIKit -[UIScrollView _endPanWithEvent:]
   7 UIKit -[UIScrollView(Static) _startTimer:]
   6 CoreFoundation CFNotificationCenterAddObserver
   5 CoreFoundation _CFXNotificationRegisterObserver
   4 libnotify.dylib notify_register_dispatch
   3 libnotify.dylib notify_register_mach_port
   2 libnotify.dylib token_table_add
   1 libsystem_c.dylib strdup
   0 libsystem_c.dylib malloc

在地图视图上滚动时似乎会发生这种情况,但是由于堆栈中没有引用我的代码,因此我不确定如何进行.我应该如何继续诊断此泄漏?

It seems to occur whilst scrolling on a map view, but I am unsure how to proceed as none of my code is referenced in the stack. How should I proceed in diagnosing this leak?

如果需要进一步的信息,请告诉我.

If any further information is required, please let me know.

关于, 尼克

推荐答案

如果只有" 48个字节,则所有证据都指向系统框架中的框架(即,分配永远不会暴露给您的代码),并且有不是成千上万的'em,那么我(a)不会为此担心太多,但我会(b)立即通过

If it is "only" 48 bytes, all evidence points to frames in the system frameworks (i.e. the allocation is never exposed to your code), and there are not 10s of thousands of 'em, then I (a) wouldn't worry about it too much, but I would (b) immediately file a bug via http://bugreport.apple.com/

附上您的应用程序的二进制文件以及有关如何重现此问题的说明.

Attach a binary of your application and instructions as to how to reproduce the issue.

这篇关于Obj-C:strdup帧中Malloc 48字节的内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆