views:

28

answers:

1

I am able to load over 200 UIImage objects into a NSMutableDictionary without any memorry warning issues.

When I start displaying them on the screen (after about showing 10-20 images) I get low memory warnings and an eventual crash.

Only about 8 images are displayed at anyone time.

Does it take additional memory to actually draw a UIImage on the screen?

No memory leaks are showing up and i've reviewed code for leaks many many times.

A: 

The documentation says that having a UIImage doesn't necessarily imply that the image is actually stored in memory, because it could be purged from the image cache. But it does say that if you try to draw it, it will be pulled back into memory. Maybe it starts purging from its image cache before it warns you about the low memory condition. That explains everything you're seeing.

Thanks. I wonder how actively the internal data of the UIImage object is purged. It would seem like my images that are being taken off screen would be purged internally and even though I may get memory warnings, I wouldn't eventually crash.
maxpower