Hey guys,
I found the following information @ the link
memory management - img_data_lock iphone - imageNamed vs imageWithContentsofFile - Stack Overflow
Quote:
UIImage's methods imageNamed: and imageWithContentsOfFile: do slightly different things. imageNamed loads the image in a special system cache, and then future calls with that image path will return the image in the cache instead of reloading it from disk. imageWithContentsOfFile simply loads the image at the path you specify, but does no caching. Multiple calls to imageWithContentsOfFile for the same image will result in multiple copies in memory.
iOS doesn't seem to empty the cache when a memory warning is issued, which can lead to apps being terminated for lack of free memory. UIImages loaded with imageWithContentsOfFile respond to memory warnings by purging their images and reloading it when needed,
|
Also, UIImageViews reference advices not to use the file extensions so that the images can be selected by the device itself, with the underlying device type/family.
Does images are recognized by the device as UIImageView says, when imageWithContentsOfFile is used ?
or
Is there any good way of using images in an application, with good performance and memory handling ?
Thanks in Advance.