I read a sample ListAdder code, and there are many statements immediately after the variable or is used for almost every method, for example:
self.formatter = [[[NSNumberFormatter alloc] init] autorelease]; assert(self.formatter != nil);
or:
- (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath { #pragma unused(tv) #pragma unused(indexPath) UITableViewCell * cell; assert(tv == self.tableView); assert(indexPath != NULL); assert(indexPath.section < kListAdderSectionIndexCount); assert(indexPath.row < ((indexPath.section == kListAdderSectionIndexNumbers) ? [self.numbers count] : 1));
I was wondering what's the point of doing this?
thanks
source share