O'Reilly logo

The Complete Idiot's Guide® To iPad and iPhone App Development by Troy Brant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Clang

Clang works by looking at your code before you run it. Using Clang, you can easily identify memory leaks, uninitialized variables, and other bugs in your code.
Using Clang is really simple since it is built into Xcode. To have Clang analyze your code, just select Build > Build and Analyze from the top menu bar in Xcode. Click the Build Results tab in the Editor window to see the results. Selecting each item in the list will take you to the line of code where there is a potential bug. Pretty nice, right?

Using Clang

To see a real-world example, analyze the EveryDayCounts application by following these steps:
1. If you haven’t already, download the EveryDayCounts application at http://troybrant.net/iphonebook/chapter22/EveryDayCounts.zip ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required