Memory leak using multidimensional Array
<p><img src="http://i.stack.imgur.com/XU2js.png" alt="enter image description here">
i got memoery leak at that multidimensional mutable array i need to remove those leak because due to this leak app is not working in iphone,i dnt how remove this leak</p>

<blockquote>
  <p>CGRect                bounds =[self bounds];</p>
</blockquote>

<pre><code>UITouch*            touch = [[event touchesForView:self] anyObject];
if (firstTouch) {
    firstTouch = NO;
    previousLocation = [touch previousLocationInView:self];
    previousLocation.y = bounds.size.height - previousLocation.y;
    NSMutableArray *temp=[[NSMutableArray alloc]init];
    [undo addObject:temp];
    /***** add 1st point *********/
    [[undo objectAtIndex:[undo count] -1] addObject:[NSValue valueWithCGPoint:previousLocation]];

    if(mcount==1)
    {
        [masking addObject:[[NSMutableArray alloc]init]];
        [[masking objectAtIndex:[masking count]-1] addObject:[NSValue valueWithCGPoint:previousLocation]];
    }
} else {

    location = [touch locationInView:self];
    location.y = bounds.size.height - location.y;
    previousLocation = [touch previousLocationInView:self];
    previousLocation.y = bounds.size.height - previousLocation.y;


    [[undo objectAtIndex:[undo count] -1]addObject:[NSValue valueWithCGPoint:previousLocation]];

    if(mcount==1)
    {
         [[masking objectAtIndex:[masking count]-1] addObject:[NSValue valueWithCGPoint:previousLocation]];
    } 
}
</code></pre>
