I run my app in Instruments in order to look for the possible memory leaks. I currently don't have any leaks. However, I would like to have some help interpreting the memory allocation. When I'm in the first screen, let's say the memory allocation is 1.50 MB. When I navigate to the second screen the memory allocation is 1.80 MB. When I navigate back to the first screen, the memory allocation is 1.55 MB. Is it expected that when I navigate to the first screen, the memory is not as low as at the beginning?
Asked
Active
Viewed 163 times
0
-
See this recently asked question http://stackoverflow.com/questions/6899755/how-can-i-track-down-memory-peaks-thats-peaks-with-a-p-not-an-l – Joe Aug 03 '11 at 20:54
1 Answers
2
Seeing memory usage increase like this is usually down to one of two things.
- Some objects are caching data in memory, to make it faster to reload if you access those resources again (images may do this)
- You have a memory leak
You can usually tell the difference between the two by doing the task a few times and seeing if the memory increases each time. So for example, if you go to your second screen and back 10 times and the memory allocation on the first screen increases each time, you probably have a leak.

Martin Pilkington
- 3,261
- 22
- 16