mkersche17
mkersche17

Reputation: 105

Memory increase while scrolling through UITableview-Cells wont dellocated

I´ve a UiTableview with custom UITableviewcells.

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
 static NSString *CellIdentifier = @"Cell";
AssortmentTableViewCell *cell = (AssortmentTableViewCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];

Breads *bread = [self.fetchedResultsController objectAtIndexPath:indexPath];
cell.breadName.text = bread.name;
cell.breadImageOutlet.image = [UIImage imageNamed:bread.breadimage];
cell.selectionStyle = UITableViewCellSelectionStyleNone;

return cell;
}

When I´m scrolling through the Tableview, the memory rises sharply. It seems, that the cells aren´t reuse. When the Tableview disappeares, the memory isn´t released. I work with IOS7/xcode5.

What could be the error?
For instructions I would be very grateful.

Upvotes: 1

Views: 1217

Answers (1)

user3615737
user3615737

Reputation: 104

This could be caused by UIKit caching the images, which is nothing to worry about, since the cache will be flushed if there is low memory. Does the memory use continue increasing indefinitely when scrolling up and down through the table view? If so then it is probably a fault in the implementation of AssortmentTableViewCell.

Upvotes: 1

Related Questions