Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //First line create memory leak
- UIImage *ImageAvatar = [[UIImage alloc] initWithData:[myg.imageData copy]];
- Moins1 = ImageAvatar;
- //[ImageAvatar release]; if i release-> EXC_BAD_ACCESS
- UIImage *Moins1;
- ...
- @property (nonatomic, retain) UIImage *Moins1;
- UIImage *Moins1;
- @property (nonatomic, retain) UIImage *Moins1;
- NSData * imageData = [myg.imageData copy];
- UIImage * ImageAvatar = [[UIImage alloc] initWithData:imageData];
- [imageData release];
- [self setMoins1:ImageAvatar];
- [ImageAvatar release];
- UIImage *ImageAvatar =
- [[UIImage alloc] initWithData:[[myg.imageData copy] autorelease]];
- self.Moins1 = ImageAvatar;
- [ImageAvatar release];
- self.Moins1 = [UIImage imageWithData:[[myg.imageData copy] autorelease]];
Add Comment
Please, Sign In to add comment