My app take a screenshot about my view. The code works but the profile/allocations tool shows that memory isn't released the context. Here is some code about this:
CGRect rect = CGRectMake(0,0, self.view.frame.size.width, self.view.frame.size.height);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
[self.view.layer renderInContext:context]; //allocations tool shows 49.6% alert here!
UIImage *wallpaper = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
I tried to use autorelease{} but nothing works... So my app memory usage is getting higher and higher after this action, I don't know how to release this context. I'm using ARC.