What’s the difference?


It”s late and I’m stumped. Trying to figure out what’s the difference between

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    static NSString *CellIdentifier = @"Cell";
	UITableViewCell *cell = [tableView
							 dequeueReusableCellWithIdentifier:CellIdentifier];
	if (cell == nil) {
		cell = [[[UITableViewCell alloc]
				 initWithFrame:CGRectZero
				 reuseIdentifier:CellIdentifier] autorelease];
	}
	cell.text = [teams objectAtIndex:indexPath.row];
	return cell;
}

and:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
	UITableViewCell *cell = [tableView
							 dequeueReusableCellWithIdentifier:@"Cell"];
	if (cell == nil) {
		cell = [[[UITableViewCell alloc]
				 initWithFrame:CGRectZero
				 reuseIdentifier:@"Cell"] autorelease];
	}
	cell.text = [teams objectAtIndex:indexPath.row];
	return cell;
}

I’ve seen this pattern twice, once in an iPhone SDK book and once in code generated by XCode. That’s enough to make me feel like there’s a reason we use a temp variable here. (Incidentally I didn’t notice the redundancy in my refactoring until I pasted/posted the code snippet. If the motivation is merely to cut down redundancy then I’m fine with that, I just wanna make sure I’m not missing something important.)