Hi,
Can someone please explain why the following code causes my app to bomb?
NSData *myImage = UIImagePNGRepresentation(imageView.image);
:
[myImage release];
If I comment out the 'release' line, the app runs... but a few times calling the function containing this code and I get a crash - I guess caused by a memory leak.
Even if I comment EVERYTHING else in the function out and just leave those two lines, when the release executes, the app crashes.
I'm sure this must be a newbie "you don't know how to clean up your mess properly" kind of thing ;-)
Cheers,
Jamie.