Reputation: 21
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.
Upvotes: 1
Views: 3366
Reputation: 11839
You can use Leaks
and Static memory analyser
to detect leak/static memory loopholes in code with Xcode.
Static memory analyser - http://developer.apple.com/library/mac/#featuredarticles/StaticAnalysis/index.html
Upvotes: 1
Reputation: 122381
You can use Instruments to find the leaks using the Leaks profile.
Here's a tutorial by Ray Wenderlich.
Upvotes: 0
Reputation: 3434
Please make sure that the allocated memory is deallocated using the free() method.
After using "malloc and calloc" to allocate memory is important for freeing up the allocated memory when finished with it.
Upvotes: 0