Application termination due to memory

I have an application for receiving images in batch mode, but one time when the image is taken and is about to come to view, its receipt crashed and errors indicate that "The application was canceled due to memory pressure"

I need to take more images when the user holds the camera button ... after Leave the button, I need to show all the images as a slideshow..what should I do?

My code is:

- (void)longPress:(UILongPressGestureRecognizer*)gesture {
    if (gesture.state == UIGestureRecognizerStateBegan) {
        [[NSNotificationCenter defaultCenter] addObserver:self
                                                 selector:@selector(takePictures)
                                                     name:AVCaptureSessionDidStartRunningNotification object:nil];
    }
    else if (gesture.state == UIGestureRecognizerStateEnded)
    {
    }


-(void)takePictures
{
    [imagePicker takePicture];
}

Help me..

+4
source share
1 answer

- . , takePicture, - . imagePicker, , iOS - . Jetsam/memorystatus , .

:

A) . , j, takePictures, j% 2 == 0 j% 3 == 0 ( )

B) , ( ).

+2

All Articles