UIGraphicsBeginImageContext(targetSize); //instruments show here a leak 128bytes
CGRect thumbnailRect = CGRectZero;
thumbnailRect.origin = thumbnailPoint;
thumbnailRect.size.width = scaledWidth;
thumbnailRect.size.height = scaledHeight;
[sourceImage drawInRect:thumbnailRect];
newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Hi I'm trying to scale a UIImage so I load it with
[UIImage imageNamed:@"myImage.png"];
and then pass it into a method. In that method I have the code above that resizes my image and at the end of the method I have a
return newImage;
The instruments show me a leak at line
UIGraphicsBeginImageContext(targetSize); //instruments show here a leak 128bytes
What am I doing wrong? Where exactly is the leak?