Tuesday, September 15, 2009

Andy Finnell: [UIImage imageNamed:] is a memory leak

Itt van az egesz, de a lenyeg roviden:

"... the UIImages I had constructed with imageNamed: were failing to be released. I suspected that they were being retained in a global cache. The only problem with this cache is it is never released, ever. Even when my app receives a low memory notification and I free up all the memory I can, the UIImage global cache just sits there clutching it’s unused UIImages to its chest, muttering."
...
"The moral of the story is imageNamed: is only for use with small images that are used constantly throughout the app’s lifetime. Never use imageNamed: if you ever want that memory back."

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.