imageWithContentsOfFile: vs imageNamed:
As far as I know,
imageNamed loads the image into a special system cache, and then future calls with this path will return the image to the cache, and not reload it from disk.
imageWithContentsOfFile just loads the image at the path you specify, but does not cache. Multiple calls to imageWithContentsOfFile for the same image will result in multiple copies in memory.
And about memory leaks, I'm not sure which one is better to use when using a large number of images in programming ...
source share