NSMutableArray *a1 = [[NSMutableArray alloc] init]; NSMutableArray *a2 = [NSMutableArray array]; TempObj *obj = [[TempObj alloc] init]; //assume this line is repeat
i dont know either im right or wrong
NSMutableArray *a1 = [[NSMutableArray alloc] init]; // will be autorelease NSMutableArray *a1 = [NSMutableArray alloc]; // will not autorelease
after you [a1 removeAllObjects];
[a1 removeAllObjects];