Where is the leak?
Posted
by Horatiu Paraschiv
on Stack Overflow
See other posts from Stack Overflow
or by Horatiu Paraschiv
Published on 2010-06-11T16:23:05Z
Indexed on
2010/06/11
17:53 UTC
Read the original article
Hit count: 344
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?
© Stack Overflow or respective owner