application crash after low memory warnings
<p>my iphone application crash after raising 4 warnings of low memory, instruments is showing no memory leaks but in memory allocation live Bytes goes up to 4.7mb and Over all Bytes goes upto 79.0 MB and application crash at this point</p>

<p>any help will be highly appreciated  </p>

<pre><code>for (int i = 0; i&lt;3; i++) 
{

    UIImage *rendered_image;
    UIGraphicsBeginImageContextWithOptions(sub_view.bounds.size, NO, 0.0);

    [appdelegate.arrimages removeAllObjects];
    [appdelegate.arranimations removeAllObjects];

    NSString *oldgroup = [[NSString alloc] init];
    NSString *currentgroup = [[NSString alloc] init];

    for(int i=0; i&lt;[sub_view.data count]; i++)
    {

        oldgroup = (i&gt;0) ? [sub_view.group objectAtIndex:(i-1)] : [sub_view.group objectAtIndex:i];
        currentgroup = [sub_view.group objectAtIndex:i];

       /*
        IF DIFFERENT GROUP NAME RECEIVED 
         1-GET NEW INSTANCE OF IMAGE 
         2-SAVE PREVIOUS IN ARRAY
       */



     if (![oldgroup isEqualToString:currentgroup]) 
         {

             rendered_image = UIGraphicsGetImageFromCurrentImageContext();

             [self SaveImagesOfAnimation:[self compressImageDownToPhoneScreenSize:rendered_image]];

             [appdelegate.arranimations addObject:[sub_view.anim objectAtIndex:i]];

             UIGraphicsEndImageContext();
             UIGraphicsBeginImageContextWithOptions(sub_view.bounds.size, NO, 0.0);

        }

        id element = [sub_view.data objectAtIndex:i];     

        color = [sub_view.fillColor objectAtIndex:i];

        [color setFill];
        [element fill];

        [[UIColor blackColor] setStroke];
        [element stroke];

    }

    rendered_image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    [self SaveImagesOfAnimation:[self compressImageDownToPhoneScreenSize:rendered_image]];

}
</code></pre>
