0

My app has a 3x3 grid of images that fill the screen. I allow users to take pictures using a UIImagePickerController, and set these to be displayed on the grid.

Once I get to the 7th or 8th picture, however, my console starts showing that I have memory warnings. Specifically I get bunch of these:

2013-11-05 00:04:46.008 gridTestApp[545:907] Received memory warning.
2013-11-05 00:05:00.445 gridTestApp[545:907] Received memory warning.

I ran a profile and I don't have any leaks. My app uses around 50MB. Any ideas on how to lower this / why my app is crashing?

Marcel Puyat
  • 325
  • 3
  • 8
  • 1
    See this .."[Very common](http://stackoverflow.com/a/3099167/1756131)". (Well said :-)) – DD_ Nov 05 '13 at 08:16

1 Answers1

1

Where are you storing your pictures? Keep on mind that each picture takes considerable amount of space. If you need to access the pictures later, it's better to save them on disk and release the object.

If you need to display several pictures at the same time, it's better to resize and cache each picture. In this way you reduce the amount of memory you need.

Diego A. Rincon
  • 747
  • 1
  • 8
  • 25