On Windows for memory leaks/buffer overruns and other runtime error detection you can use:
- Boundschecker from Compuware (http://www.compuware.com/products/devpartner/visualc.htm)
- IBM Rational Purify
I think they worth their price if you have large projects that need cleanup.