renderInContext creating memory that is not promptly released

Posted by iworkinprogress on Stack Overflow See other posts from Stack Overflow or by iworkinprogress
Published on 2010-05-07T00:17:19Z Indexed on 2010/05/07 0:18 UTC
Read the original article Hit count: 335

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?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about core-graphics