This article is from the Mac Programming FAQ, by Jon Watte h+@austin.metrowerks.com with numerous contributions by others.
Get ahold of, and install, the extensions DoubleTrouble,
DisposeResource and EvenBetterBusError. They will catch 80% of any
memory related bugs you may have, including many bugs that follow NULL
handles or pointers. (Jasik's Debugger (see above) obviates the need
for these.)
A low-level debugger is required, and while you install it, install the
"leaks" dcmd which will help you catch memory leaks in your application.
All of these tools are available from <ftp.apple.com>.
 
Continue to: