tags:

views:

144

answers:

2

Hello,

i have heard that developers rarely used UIImage imagenamed: property bcoz it stores image in Cache memory. But my information says that from SDK 3.0 onwards, this issue is solved. can anybody pl. tell me whether i should use Imsgenamed: or not ?

A: 

Depends on whether or not you consider caching an "issue." The +imageNamed: documentation in the 3.1 SDK says it still caches the image, and checks the cache on subsequent calls; it's up to you to decide whether or not you want this behavior.

Tim
+1  A: 

See relevant question.
So the problem with +imageNamed: method was not that it caches images (it is method's intended behaviour) but that that cache was not cleared when it was needed (in case of low memory warnings).

In the answer to the question I mentioned it is stated that this issue should be fixed in SDK 3.0. To add - in my application I have map-like large tiled image and unused tiles seem to be effectively deleted when needed so I'd say that the issue is solved indeed.

Vladimir