Question: I am writing an iPhone App which contains part of C,C++ code.
I allocate memory using malloc() and calloc().

How can i check memory leaks in this part of code using Xcode profile.

Can anyone please help.

Thanks in advance.

Answer: 
You can use `Leaks` and `Static memory analyser` to detect leak/static memory loopholes in code with Xcode.

Leaks - <http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introduction.html>

Static memory analyser - <http://developer.apple.com/library/mac/#featuredarticles/StaticAnalysis/index.html>
You can use [Instruments](http://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introduction.html) to find the leaks using the *Leaks* profile.

Here's a [tutorial](http://www.raywenderlich.com/2696/how-to-debug-memory-leaks-with-xcode-and-instruments-tutorial) by Ray Wenderlich.