在没有 Clang 的情况下找出内存泄漏
我正在尝试看看我是否可以在 Apple 的 TopSongs 应用程序中找到一些泄漏信息。有人可以帮我至少解决一个问题吗?如何识别泄漏报告中的内容以及如何找到它们?
即:我得到这样的一个:
# Category Event Type Timestamp Address Size Responsible Library Responsible Caller
0 GeneralBlock-448 Malloc 00:02.185 0x3f41220 448 libxml2.2.dylib xmlNewParserCtxt
据我所知,方法 xmlNewParserCtxt 是问题所在,它没有释放对象,因此是 Malloc。负责的库告诉我这是 libxml2.2.dylib 库有问题,我无法编辑。
我的方向正确吗?如果是这样,一半的泄漏都在该库中,好吧,我无法编辑它。
更新
:
查看此问题的答案。
I'm trying to see if I can find some leaks myself in Apple's TopSongs app. Can someone help me out in at least one and how to identify what is in the Leaks reports and how I can get an idea on finding them?
ie: I got one like this:
# Category Event Type Timestamp Address Size Responsible Library Responsible Caller
0 GeneralBlock-448 Malloc 00:02.185 0x3f41220 448 libxml2.2.dylib xmlNewParserCtxt
From what I can tell, the method xmlNewParserCtxt is the problem, and it's not releasing an object, hence Malloc. The responsible library tells me it's the libxml2.2.dylib library with the problem, which I can't edit.
Am I heading in the right direction? If so, half the leaks are in that library and well, i can't edit that.
'
UPDATE:
Check out the answer to this question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许创建了一个
xmlNewParserCtxt
(malloc
),然后没有释放?
Perhaps a
xmlNewParserCtxt
was created (malloc
'd)and then not freed?
终于安装了 Snow Leopard 和 Xcode 3.2,并内置了 Clang。不管怎样,苹果的代码似乎在他们的库中有自己的漏洞。我决定不使用 Apple 的 TopSongs 代码。
Finally got Snow Leopard and Xcode 3.2 installed with the built-in Clang. Anyways, it seems like Apple's code has it's own leaks inside their libraries. I decided not to use Apple's TopSongs code.