这是我的第一篇文章,所以我希望格式化可以。内存泄漏:在线分配的对象的潜在泄漏
我得到这个泄漏“上线的对象的潜在泄漏”,我无法弄清楚。也许我太看重它,因此我看不到问题。有人可以帮我吗?
该生产线的问题是:appDelegate.imageText
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
PListFirstAppDelegate *appDelegate = (PListFirstAppDelegate *)[[UIApplication sharedApplication]delegate];
appDelegate.imageText= [[NSString alloc]initWithFormat:@"%@",[[array objectAtIndex:indexPath.row]objectForKey:@"image"]];
//NSLog(@"%@", appDelegate.imageText);
NavigationalDescription *detailViewController = [[NavigationalDescription alloc] initWithNibName:@"NavigationalDescription" bundle:nil];
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];
}
感谢这个工作替换代码。 – user1309075 2012-10-08 16:56:27
很高兴它的工作,你应该接受一个答案供他人以后参考。 – rooftop 2012-10-08 18:17:01