why is this a mem leak?
got this warning of a mem leak in the following...
any ideas?
- (UITableViewCell *)tableView:(UITableView *)tableView ce开发者_如何学JAVAllForRowAtIndexPath:(NSIndexPath *)indexPath {
NSUInteger row = [indexPath row];
UITableViewCell *cell = [self newOrReusableCell];
cell.textLabel.text = [_evaluationArray objectAtIndex:row];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
thanks
EDIT: here s the warning: ... Object allocated on line 128 and stored into 'cell' is returned from a method whose name ('tableView:cellForRowAtIndexPath:') does not contain 'copy' or otherwise starts with 'new' or 'alloc'. This violates the naming convention rules given in the Memory Management Guide for Cocoa (object leaked)
ah! forget it! found the answer.. is the way i named my cell...
精彩评论