UITableViewCell - super dealloc EXC_BAD_ACCESS
What could cause a [super dealloc]; to crash?
So I have this in my UITableViewCell
- (void)dealloc
{
// this is ok
[others release];
// this crash
[super dealloc];
}
Basically I have a UITabViewController. When I navigate to another tab, and come back to this tab that contains the UITableViewCell, it will crash at [super dealloc];
This is how the cell is getting called.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"DynamicSizedCell";
DynamicSizedCell *cell = (DynamicSizedCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == n开发者_开发知识库il) {
cell = [[[DynamicSizedCell alloc] init] autorelease];
}
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
return cell;
}
Thanks,
Tee
精彩评论