I'm getting an EXC_BAD_ACCESS
when releasing newImage
on the last line of the following code snippet:
UIGraphicsBeginImageContext(newSize); [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)]; UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); [self setImageToSave:newImage]; [newImage release];
I'm assuming that newImage
is released with the call on the preceding line. If so, why is it being released in the setImageToSave
method?