I am using CGImageCreateWithImageInRect()
for generating a small image from a background image runtime, which is going to displayed for every thread call (0.01 sec). Once I start showing part of image through CGImageCreateWithImageInRect
application starts consuming memory in very high rate and crashes within seconds. Memory consumed goes to 20+ MB and crashes. Normal application would run on 2MBs.
Image1 = CGImageCreateWithImageInRect(imageRef, CGRectMake(x, y, w, h));
and after processing I do
CGImageRelease(Image1);
but it is not helping me.
I want to know how to release memory associated with CGImageCreateWithImageInRect
.