I have some problems with memory management.
I thought to use the init- messages instead, like this:
Code:
NSData * data = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:myURL]];
UIImage *img = [[UIImage alloc] initWithData:data];
[myImageView setImage:img];
[img dealloc];
[data dealloc];
If I use it like this, when code reaches [data dealloc] it segfaults.
Why is this happening?