viewForHeaderInSection creating a memory leak?
问题 I am having great success getting the look I want using a custom header view and the delegate method tableView: viewForHeaderInSection:. But I think it is producing a memory leak, and I'm not sure what to do about it. The code is this: - (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { NSLog (@"New header, section %d", section); ResultsHeaderView *header = [[ResultsHeaderView alloc] initWithFrame:CGRectMake(0, 0, defaultResultsHeaderSize.width,