Run the Xcode Static Analyzer to Find Hidden Bugs

When your application crashes, you know you have to fix it before submitting to the App Store. The problem is that you can’t test every possible situation that could reveal bugs in your code. With Xcode 3.2 for Snow Leopard, there is a new feature called static analysis that can do exactly that—look for bugs in virtually every possible code path. Simply choose the "Build and Analyze" menu item and Xcode finds memory management issues, potential logic errors, and other common coding mistakes. Click on any reported error and Xcode walks you through the steps that reveal the bug. Xcode helps you find and fix bugs before your users ever see them.

You can learn more by reading Static Analysis in Xcode.