Нет, здесь вы неправильно управляете памятью:
вам следует использовать «повторно используемые» UITableViewCells, большинство примеров UITableView показывают, как это сделать, и
не делайте [выпуск модели], в этом случае вы не «владеете» объектом, вы просто ссылаетесь на него, поэтому вы не должны отпускать его
Вот типичный cellForRowAtIndexPath:
-(UITableViewCell *) tableView:(UITableView *)atableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"CellIdentifier";
// Dequeue or create a cell of the appropriate type.
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
// settings that do not change with every row
cell.selectionStyle = UITableViewCellSelectionStyleGray;
}
// settings that change with every row
cell.textLabel.text = @"fill in your label here";
return cell;
}
Кроме того, если вы используете БД для своих данных, вы можете захотеть заглянуть в Core Data, инфраструктуру хранения / управления данными Apple, она включает в себя возможностьподключите аспекты ваших сущностей данных непосредственно к UITableViews.