-1
在我的計劃,而在mapArray1 加入PLACE1我已經發布了mapArray1
在dealloc
方法內存泄漏和添加對象。那麼也泄漏我要釋放的地方mapArray1
?泄漏而在for循環
place1 = [[NSMutableDictionary alloc] init];
for(i=0;i<[array count];i++)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[place1 setObject:@"1" forKey:@"ID"];
lati=[array1 objectAtIndex:i];
[place1 setObject:lati forKey:@"latitude"];
long i = [array2 objectAtIndex:i];
[place1 setObject:longi forKey:@"longitude"];
[mapArray1 addObject:[place1 copy]];
[pool release];
}
我覺得這個'[PLACE1複製]'泄漏。 – 2011-05-30 06:48:08