我得到那個多維可變數組我需要刪除這些泄漏memoery泄漏,因爲由於這種泄漏的應用程序不能在iPhone的工作,我DNT如何消除這種泄漏內存泄漏使用多維數組
的CGRect bounds = [自我界限];
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]];
}
}
我沒有看到這裏問了一個問題。你的問題是什麼?你有什麼嘗試?你是否縮小了它?請編輯您的問題以添加此信息。 –