Book Image

Objective-C Memory Management Essentials

Book Image

Objective-C Memory Management Essentials

Overview of this book

Table of Contents (18 chapters)
Objective-C Memory Management Essentials
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using the LLVM / Clang Static Analyzer


The Instruments suite of tools is meant to be used when your app is running. However, sometimes, as the saying goes, an ounce of prevention is worth a pound of cure. So, before you pull up Instruments to debug your app during runtime, there is a good step that you should follow and which is performing a static analysis on your code base.

Static analysis is a mechanism where a collection of algorithms and techniques are used to analyze your source code to find bugs. This may sound like what you do during the compilation stage, but there is an important difference. The act of compiling your code will tell Xcode to check your code base for syntax errors and flag out any errors or warnings that it detects. Static analysis goes one step deeper in that it analyzes your code to find potential bugs that will surface during runtime. Static analysis lets the program calculate all possible executions of a program, and the code is analyzed for quality, safety, and...