1000 요소가있는 UITableView가 있습니다. 처음으로로드하기 전에 Instruments는 2.20MB의 바이트가 여전히 살아 있음을 보여줍니다. 충전 후 4.82MB로 표시됩니다. 메모리를 해제하고 이전 상태로 돌아 가면 4.71MB를 표시합니다. 하지만 이제 동일한 테이블을로드하면 Instruments는 4.82MB를 다시 표시합니다. UITableView의 구조가 캐시에 저장되어 있습니까? 그렇다면이 메모리를 해제 할 수있는 방법이 있습니까?캐시 된 요소 UITableView
내 테이블 구조 : 물론
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"SearchResult";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier] autorelease];
}
if(!isSomeStateSearching) cell.textLabel.text = [[[contentSomeState objectAtIndex:indexPath.section] objectForKey:@"rowValues"] objectAtIndex:indexPath.row];
else
{
cell.textLabel.text = [searchedAllContent objectAtIndex:indexPath.row];
}
UIView *v = [[[UIView alloc] init] autorelease];
v.backgroundColor = [UIColor colorWithRed:188/255.0 green:57/255.0 blue:25/255.0 alpha:1.0];
cell.selectedBackgroundView = v;
UIImageView *arrow = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"seta_navegacao"]] autorelease];
cell.accessoryView = arrow;
return cell;
}
예, 질문에 추가하겠습니다. – flopes