Instruments

The static analyzer is useful for catching issues that can be recognized at compile time. However, some problems can’t be recognized until runtime. This is where Instruments excels. The Instruments tool monitors your application while it is running and can find real issues as they are happening. Instruments is made up of several plug-ins that enable you to inspect things like what objects are allocated, where the CPU is spending its time, file I/O, network I/O, and others. Each plug-in is known as an Instrument. Together, they help you track down inefficiencies in your application and optimize your code.

The Allocations Instrument

Now let’s see how we would find the same memory leak in TouchTracker using the Allocations instrument. ...

Get iOS Programming: The Big Nerd Ranch Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.