I use CGImageCreateWithImageInRect()to create a small image from the runtime background image that will be displayed for each call flow (0.01 sec). As soon as I start showing part of the image with CGImageCreateWithImageInRect, the application will start consuming memory at a very high speed and will work within a few seconds. Memory consumption goes up to 20+ MB and crash. A regular application will run at 2 MB.
Image1 = CGImageCreateWithImageInRect(imageRef, CGRectMake(x, y, w, h));
and after processing I do
CGImageRelease(Image1);
but it does not help me.
I want to know how to release memory related to CGImageCreateWithImageInRect.
source
share