Application crashes after when array of images are stored
- by sujyanarayan
Hi,
I'm getting the screenshots from the following code:-
CGImageRef cgScreen = UIGetScreenImage();
if (cgScreen) {
UIImage *result = [UIImage imageWithCGImage:cgScreen];
CGImageRelease(cgScreen);
return result;
}
I'm calling the above code in a timer of 1/1.0 seconds as:-
[array addObject:[UIImage imageWithScreenContents]];
where imagewithScreenContents is a function.
But after some seconds i.e after adding 90 frames application crashes.
I'm unable to understand the problem.
Can somebody help me in solving the problem.
Thanks in Adv.