iPhone Tips and Tricks

Memory leaks in iOS devices | Analyze Memory leaks of an iOS using Mac

memory leakage

How to analyze memory leak of an iOS device using Mac:

Working with different apps on an iOS device like iPhone, iPad or iPod touch and are you willing to know their respective memory leaks. Here comes an easy procedure to analyze the memory leak of an application in an iPhone, iPad or iPod touch using Mac.

Choose the device on which you need to analyze the memory leak and connect it to the Mac machine. Mac machine plays a major role in analyzing the performance, activities, memory usage, leaks etc… Connect the device to Mac machine using a USB cable. Now launch Xcode on the Mac machine and click on the Xcode icon to view the list of options that are available. From the available Xcode options click on Open Developer Tool option. Here you can find many options that you are with the developer tool. Choose Instruments by clicking on it and navigate to Instruments window.

Memory Leaks in iOS devices

From the Instruments window choose the Standard option so that you can find many number of instrumenting core aspects. Scroll over the window and click on Leaks icon. Now you will be navigated to the Instruments Leaks window. The overall path to be followed is Xcode-> Open Developer Tool-> Instruments -> Standard -> Leaks. From the Instruments window now you will two options Allocations and Leaks. The Allocations denotes the memory that is allocated for the application process and leaks denotes the memory leak of that application. Click on Leaks and now choose the device on which you need to verify memory-leak.

Analyze Memory leaks using Mac

Choose the device by clicking on the <machine/device name> beside the Pause icon at the top right corner of the window. Here you can identify list of simulators available, system details and list of devices that are connected to the machine. After choosing the device, you need to select the target application for which you need to verify the memory leak. After setting up all the pre-requisites click the red icon at the top left corner of the window to start recording. The track of the memory allocated and leak will be displayed for a time limit until you click on the pause icon. Save the memory leaks and analyze it whenever you require. As it saved in the form of a data file you can even share it with others. This is how you can analyze memory leak of an iOS device using Mac.


Originally posted 2015-03-28 15:58:17.