ObjectAlloc Tools: Explanation of Real-Time Bytes and Common Bytes

I use the Instument ObjectAlloc tool, trying to understand what my application (iPhone) does, when and where it does it.

I would really like to get a basic explanation of these statistics:

  • Live bytes
  • A life

  • Transitional

  • Shared byte

When I try to determine how much memory my application is using, can I see Live Bytes or shared bytes? Does this include a memory leak? What are Transitory objects?

thank

+85
objective-c iphone xcode instruments
Jan 28 '10 at 11:51 on
source share
2 answers

ObjectAlloc monitors the allocation and freeing of memory while your program is running.

Living bytes, or Net bytes - how much memory is used by your application at the time of selection on the timeline. This will include a memory leak, as a memory leak is never freed.

#Living - how many selections of a certain size / type of object occurred (and still selected). This is very useful when searching for leaks.

For example, if you re-perform an action (for example, exit the modal view controller) and you see that the #Living object grows by the same amount every time, then you are probably objects. You can then confirm by drilling and viewing the exact line of code that selects the objects, and even see the time index, each of which was created.

Overall bytes include freed memory. It is useful to keep track of this number for performance optimization purposes, but not if you are just trying to see your current memory size or look for leaks.

+109
Jan 28
source share

Description of statistics from Apple documents. Document Link

enter image description here

enter image description here

+18
Nov 30 '12 at 5:12
source share



All Articles