I googled for a memory issue related to UIImage, and came across many topics that talk about the problem but have no real help or solution.
I know when we use the -imageNamed:object is cached, so it’s better to use initWithData:. When we use drawRect:and UIGraphicsGetImageFromCurrentImageContext(), does the image go cache?
Also in the following code:
CGImageRef tmp = CGImageCreateWithImageInRect(imageToCrop.CGImage, clippedRect);
CGImageRelease(tmp);
Does caching happen even though there is no link in the documentation? How do we free the memory consumed by the cache?
source
share