i am doing something like below
shouldnot i be able to release img ?
because i dont need the image anymore i ca release img, isn;t it ?
in UIImageView we are able to do that, in button why not ?
like in
it just works fine !
regards
jagat
Code:
UIImage *img = [UIImage imageNamed:@"a.png"];
UIButton *btn =[[valid instance from nib file]]
[btn setbackgroundImage:img forState:UIControlStateNormal];
[img release];
shouldnot i be able to release img ?
because i dont need the image anymore i ca release img, isn;t it ?
in UIImageView we are able to do that, in button why not ?
like in
Code:
UIImageView = alloc
setImage:img
add subview: imgview
[img release];
[imgview release];
regards
jagat