img_data_lock iphone - imageNamed vs imageWithContentsofFile

Posted by franz on Stack Overflow See other posts from Stack Overflow or by franz
Published on 2010-05-25T19:16:11Z Indexed on 2010/05/25 20:51 UTC
Read the original article Hit count: 470

Filed under:
|

I am noticing a surge in memory and the responsible caller as listed in instruments is img_data_lock and responsible library is coregraphics. I have been reading that the issue relates to cached vs not cached image load ? (http://stackoverflow.com/questions/316236/uiimage-imagenamed-vs-uiimage-imagewithdata) Currently my app loads a series of images via "imageNamed:"

replacing the "imageNamed:" call with "imageWithContentsOfFile" seems to solve the issue.

Has anybody any information about the img_data_lock caller ? Why would someone use "imageNamed" if it takes such a toll on memory ?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about memory-management