this may be a simple question but i can't figure the solution.Im creating a custom cell for a table view.When I'm testing the app instruments is showing leaks in code used for creating custom cell.I don't understand where i have to release the stuff for removing the leaks.Can anyone give me a hand for this. This is the code i used for creating the custom cell.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellID= @"Parcustom";
Parcustom *cell = (Parcustom *)[tableView dequeueReusableCellWithIdentifier:cellID];
if(cell==nil)
{
NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"Parcustom" owner:nil options:nil];
for(id currentObject in nibObjects)
{
if([currentObject isKindOfClass: [Parcustom class]])
{
cell = (Parcustom *)currentObject;
}
}
} // Configure the cell...
cell.f1.text=[datedisplay objectAtIndex:indexPath.row];
cell.f2.text=[tips objectAtIndex:[[indexx objectAtIndex:indexPath.row]intValue]];
cell.selectionStyle=UITableViewCellSelectionStyleGray;
return cell;
}
The instrument is saying leak in the line NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"Parcustom" owner:nil options:nil]; How can i remove this leak.Can anyone help me please.