I simplified my code to test with, and still on the phone my memory usage keeps climbing to a point where the table slows way down.
Can someone tell me what I'm doing wrong here?
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 40; }
(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 100; }
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *cellID = @"Cell"; [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:cellID]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:cellID] autorelease]; } UILabel *l=[[UILabel alloc] initWithFrame:CGRectMake(10,10,300,16)]; l.font=[UIFont boldSystemFontOfSize:15]; l.textColor=[UIColor whiteColor]; l.backgroundColor=[UIColor blackColor]; l.text=@"Just some randoom text here"; [cell.contentView addSubview:l]; [l release];