I am developing a simple application in which a design or code in which I create and an instance of a UIImage object. When I switch to the iPad screen, it forms an image of the screen and the image that I visualize in the UIImage object, after that this image, which I set in the UIImageView object, and the UIimage object are freed. Every time I sit down on the screen and above, the process runs over and over again. But this gives me a leak in renderImage = [[UIImage alloc] init]; .
the code
_renderImage = [[UIImage alloc] init]; _textImageV = [[UIImageView alloc] init]; [self renderIntoImage]; -(void)renderIntoImage { UIGraphicsBeginImageContext(bgTableView.bounds.size); [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; _renderImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); } _textImageV.image = _renderImage; [_renderImage release];
after completing the swipe process, I also release _textImageV.
How to solve memory leak problem in UIImage * _renderImage?
memory-management memory-leaks iphone ipad
Tirth
source share