pinku
pinku

Reputation: 87

How to find the memory leak in our Apps

I am working on a camera application and I have integrated it successfully but problem is that when I capture the image at first time and going to Safari page its fine. But if I again come back in camera mode and again go to Safari page the application is crashed and these line are printed on console:

2011-08-12 04:27:34.679 brandCapture[816:707] Received memory warning. Level=1

and also with Level=2.

Upvotes: 1

Views: 99

Answers (2)

Piotr Justyna
Piotr Justyna

Reputation: 4966

You can also use Instruments (e.g. Leaks), which is very helpful. You can find a tutorial here: http://www.cimgf.com/2008/04/02/cocoa-tutorial-fixing-memory-leaks-with-instruments/

Upvotes: 2

Harvin
Harvin

Reputation: 179

At the Run button on top of your XCode, click at the arrow, 4 options will appear, choose analyze. The compiler will analyze your whole application, and at the error column they will notify you with all the leaks. Click each leak to go to the code of the leak, there will be a blue arrow or line at the code, you will notice a blue button, click it and it will show you why is there a memory leak. Hope this helps

Upvotes: 2

Related Questions