我複製從一個項目的一些代碼到另一個填寫表格視圖, 我得到這個錯誤iPhone越來越ABC發送,禁止使用自動釋放的
ABC Forbids explicit message sent of auto release
當我試圖顯式消息創建一個UITableViewCell對象。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
// this line produces the error
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
HAHA。你的意思是ARC? – Legolas