One of the best tool for debugging memory problems in iOS is NSZombie.

What is NSZombies:

It’s a memory debugging aid. Specifically, when you set NSZombieEnabled then whenever an object reaches retain count 0, rather than begin deallocated it morphs itself into an NSZombie instance. Whenever such a zombie receives a message, it logs a warning rather than crashing or behaving in an unpredictable way

How to Enable NSZombies in xcode 3.2.5 and lower versions.

Please follow the steps:

1.    Expand the Executable Tree menu and select the Executable app. Double click on executable or right click and select “Get Info”.
2.    Select the arguments Tab in Executable info dialog.
3.    Click on (+)Button to add a new environment variable.
4.    Add Name as “NSZombieEnabled” and its vale to “YES”.

How to Enable NSZombies in xcode 4.0 and higher versions.

1.    Select the Project.
2.    Click on scheme to choose “Edit Sheme…”.
3.    Select the Run  <project>.app.
4.    Select the arguments tab from the dialog.
5.    Click on (+)Button to add a new environment variable.
6.    Add Name as “NSZombieEnabled” and its vale to “YES”.