My Current Problem Related links are one of below.

---

http://www.freeimagehosting.net/image.php?a65dae5f4a.png>http://www.freeimagehosting.net/uploads/th.a65dae5f4a.png alt="Free Image Hosting by FreeImageHosting.net">

[url=<http://www.freeimagehosting.net/image.php?a65dae5f4a.png][img]http://www.freeimagehosting.net/uploads/th.a65dae5f4a.png[/img][/url]>

[url=<http://www.freeimagehosting.net/image.php?a65dae5f4a.png][img=http://www.freeimagehosting.net/uploads/th.a65dae5f4a.png][/url]>

http://www.freeimagehosting.net/>http://www.freeimagehosting.net/uploads/a65dae5f4a.png border=0 alt="Free Image Hosting">

[url=<http://www.freeimagehosting.net/][img]http://www.freeimagehosting.net/uploads/a65dae5f4a.png[/img][/url]>

[url=<http://www.freeimagehosting.net/][img=http://www.freeimagehosting.net/uploads/a65dae5f4a.png][/url]>

---

I have implemented following code, to my Table view,

```
enter code here

```

- (UITableViewCell \*)tableView:(UITableView \*)tableView cellForRowAtIndexPath:(NSIndexPath \*)indexPath {

```
static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}

// customizing cell
student *t=[studentsList objectAtIndex:indexPath.row];
cell.backgroundColor=[UIColor lightGrayColor];
CGRect label1Frame=CGRectMake(10, 10, 290, 25);
CGRect label2Frame=CGRectMake(10, 33, 290, 25);
CGRect label3Frame=CGRectMake(10, 56, 290, 25);
UILabel *lbltmp;
lbltmp=[[UILabel alloc] initWithFrame:label1Frame];  // name
lbltmp.font=[UIFont boldSystemFontOfSize:15];
lbltmp.backgroundColor=[UIColor clearColor];
lbltmp.textColor=[UIColor blackColor];
lbltmp.text=t.stuName;
[cell.contentView addSubview:lbltmp];
[lbltmp release];

lbltmp=[[UILabel alloc] initWithFrame:label2Frame]; // roll no & address
lbltmp.font=[UIFont systemFontOfSize:13];
lbltmp.backgroundColor=[UIColor clearColor];
lbltmp.text=[NSString stringWithFormat:@"%i - %@",t.stuNo,t.stuAddress];
lbltmp.textColor=[UIColor grayColor];
[cell.contentView addSubview:lbltmp];
[lbltmp release];

lbltmp=[[UILabel alloc] initWithFrame:label3Frame]; // city & pin
lbltmp.font=[UIFont systemFontOfSize:13];
lbltmp.backgroundColor=[UIColor clearColor];
lbltmp.text=[NSString stringWithFormat:@"%@ - %@",t.stuCity,t.stuPin];
lbltmp.textColor=[UIColor grayColor];
[cell.contentView addSubview:lbltmp];
[lbltmp release];
//----------------------------------
cell.accessoryType=UITableViewCellAccessoryDetailDisclosureButton;
return cell;

```

}

If I implement the code as described above, problem occurs as described in above images.

If I implement following code, no problem occurs.

```
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) 
{
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];

// customizing cell
student *t=[studentsList objectAtIndex:indexPath.row];
cell.backgroundColor=[UIColor lightGrayColor];
CGRect label1Frame=CGRectMake(10, 10, 290, 25);
CGRect label2Frame=CGRectMake(10, 33, 290, 25);
CGRect label3Frame=CGRectMake(10, 56, 290, 25);
UILabel *lbltmp;
lbltmp=[[UILabel alloc] initWithFrame:label1Frame];  // name
lbltmp.font=[UIFont boldSystemFontOfSize:15];
lbltmp.backgroundColor=[UIColor clearColor];
lbltmp.textColor=[UIColor blackColor];
lbltmp.text=t.stuName;
[cell.contentView addSubview:lbltmp];
[lbltmp release];

lbltmp=[[UILabel alloc] initWithFrame:label2Frame]; // roll no & address
lbltmp.font=[UIFont systemFontOfSize:13];
lbltmp.backgroundColor=[UIColor clearColor];
lbltmp.text=[NSString stringWithFormat:@"%i - %@",t.stuNo,t.stuAddress];
lbltmp.textColor=[UIColor grayColor];
[cell.contentView addSubview:lbltmp];
[lbltmp release];

lbltmp=[[UILabel alloc] initWithFrame:label3Frame]; // city & pin
lbltmp.font=[UIFont systemFontOfSize:13];
lbltmp.backgroundColor=[UIColor clearColor];
lbltmp.text=[NSString stringWithFormat:@"%@ - %@",t.stuCity,t.stuPin];
lbltmp.textColor=[UIColor grayColor];
[cell.contentView addSubview:lbltmp];
[lbltmp release];
//----------------------------------
cell.accessoryType=UITableViewCellAccessoryDetailDisclosureButton;
}
return cell;

```

}

**Implementing the above code means, recreating the each table cell while user scrolls the tableView. It may slow down your application & it isn't the correct solution,**

Because In my application I have thousands of students & if I create each cell while scroll My Application may hang. What Should be the solution? Help me....