Release a retain UIImage property loaded via imageNamed?
Posted
by user158103
on Stack Overflow
See other posts from Stack Overflow
or by user158103
Published on 2009-09-30T18:14:22Z
Indexed on
2010/03/22
23:51 UTC
Read the original article
Hit count: 330
In my class object i've defined a (nonatomic, retain) property for UIImage. I assigned this property with an image loaded via [UIImage imageNamed:@"file.png"];
If at some point I want to reassign this property to another image, should I have to release the prior reference?
I am confused because by the retain property I know i should release it. But because imageNamed is a convenience method (does not use alloc), im not sure what rule to apply here.
Thanks for the insight!
© Stack Overflow or respective owner