renderInContext creating memory that is not promptly released
- by iworkinprogress
While debugging in instruments using 'ObjectAlloc' I'm noticing 7megs of memory being allocated for the renderInContext call, but it never is released. When I comment out the renderInContext call this doesn't happen, and future renderInContext calls does not continue to increase the memory allotment.
UIGraphicsBeginImageContext(contentHolder.bounds.size);
[contentHolder.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Is there a way to force this memory to be released?