检查仪器中的内存分配 [英] Checking memory allocation in Instruments

查看:134
本文介绍了检查仪器中的内存分配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用泄漏工具清除了我的漏洞应用程序,但是我仍然注意到,当我切换视图时,objectalloc工具会跳转到分配的对象数量和占用空间。


$ b $我特别看到很多人:



GeneralBlock-16,大多数基金会负责调用者NSLogv





GeneralBlock-0与大多数QuartzCore负责



任何提示,我可以做什么进一步调试这个?



谢谢!

解决方案

ObjectAlloc工具设计按时间绘制总体对象分配,并不考虑取消分配。基本上:它总是会上升



您可以做的是查看Net Bytes和#Net列。这些列将根据您释放的对象数量进行调整,如果您担心总体对象分配,您可以使用这些列来衡量您的计划的绩效。



您可以查看Apple支持中的此线程论坛 - 它更多地涉及到什么仪器的措施,以及如何测试你的应用程序。


I've cleared my app of leaks using the leaks tool, but I still notice that the objectalloc tool jumps up in the number of objects allocated and footprint when I switch views.

I'm especially seeing high numbers of:

GeneralBlock-16 with mostly Foundation responsible with caller NSLogv

and

GeneralBlock-0 with mostly QuartzCore responsible

Any tips on what I can do to further debug this?

Thanks!

解决方案

The ObjectAlloc tool is designed to graph total object allocation over time, and it doesn't take deallocations into account. Essentially: it will always go up.

What you can do is look at the Net Bytes and # Net columns. These columns will adjust based on the number of objects you deallocate, and if you're concerned about total object allocation you can use these to gauge your program's performance.

You can take a look at this thread on the Apple Support forums - it deals more with what Instruments measures and how you can test your app.

这篇关于检查仪器中的内存分配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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