iphone app development—setup your app part 6

1
iPhone App Development—Setup Your App Part 6 In previous parts we have explore the process of the iPhone app development from the beginning and start setting up the app in Xcode of iPhone SDK. In this part we will see about the memory leakage and memory usage in setup process. As we know that memory is extremely limited in handheld devices like iPhone so if we don't use it carefully we can't perform many tasks successfully. The best way is to release the memory from the object which is used once. We can do this by using iPhone SDK tool to view and analyze the memory usage. Now select the Device and Debug and choose Run → Run with Performance Tool → Leaks. With this command you will see the launch of instruments and can start the app on the device. Now you need to use app normally as you do in iPhone app development and you will experience the freezing periodically because instruments recording and analyzing the memory usage. During this process you will observe that your memory leakage would be in red spike in the leaks time line. Now press the red colored button and pause the app then click in the leaks time line to see the source of the leakage which will be displayed at the lower half of the screen so you can double click on the leaked objects to go further towards the responsible code or you can click on the little arrow at the address column to see the leak history. Remember one thing during iPhone app development that when you see the leak it is not compulsory that leakage is originate at the same place.

Upload: stella-robinson

Post on 10-Mar-2016

219 views

Category:

Documents


6 download

DESCRIPTION

Now you need to use app normally as you do in iPhone app development and you will experience the freezing periodically because instruments recording and analyzing the memory usage.

TRANSCRIPT

iPhone App Development—Setup Your App Part 6

In previous parts we have explore the process of the iPhone app development from the beginning and start setting up the app in Xcode of iPhone SDK. In this part we will see about the memory leakage and memory usage in setup process.

As we know that memory is extremely limited in handheld devices like iPhone so if we don't use it carefully we can't perform many tasks successfully. The best way is to release the memory from the object which is used once. We can do this by using iPhone SDK tool to view and analyze the memory usage. Now select the Device and Debug and choose Run → Run with Performance Tool → Leaks. With this command you will see the launch of instruments and can start the app on the device. Now you need to use app normally as you do in iPhone app development and you will experience the freezing periodically because instruments recording and analyzing the memory usage.

During this process you will observe that your memory leakage would be in red spike in the leaks time line. Now press the red colored button and pause the app then click in the leaks time line to see the source of the leakage which will be displayed at the lower half of the screen so you can double click on the leaked objects to go further towards the responsible code or you can click on the little arrow at the address column to see the leak history. Remember one thing during iPhone app development that when you see the leak it is not compulsory that leakage is originate at the same place.