检查仪器中的内存分配 [英] Checking memory allocation in Instruments
问题描述
$ 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屋!