Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6641773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:51:01+00:00 2026-05-25T23:51:01+00:00

Is it harmful to comment out the code that reuses the cell in a

  • 0

Is it harmful to comment out the code that reuses the cell in a UITableView?

//    if (cell == nil) 
//    {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
//    }

Thanks.

EDIT: Based on the reply of @jrturton, I decided not to do that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:51:02+00:00Added an answer on May 25, 2026 at 11:51 pm

    It will increase memory use and affect scrolling performance. If you’ve only got 10 cells, it probably doesn’t make any difference. With 1,000, it will be very noticeable.

    You will also need to comment out the dequeue call to the tableView.

    I have to ask, though – why are you concerned about this? There may be a better solution to your problem.

    Based on your comment, you might still want to reuse a cell per row – otherwise when something is scrolled off screen and returned, you would have to recreate it. You can incorporate the indexPath row and section into the cell reuse string to facilitate this:

    NSString *cellIdentifier = [NSString stringWithFormat:@"cell%d.%d",indexPath.section,indexPath.row];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Code clones, also known as Duplicate code is often considered harmful to the system
Possible Duplicate: GOTO still considered harmful? I have read articles that advise on refraining
So I was following Python's Super Considered Harmful , and went to test out
Is it harmful to put anything as a comment as a first thing in
Many years back, I was told that Javascript was harmful, and I remember being
In PHP, what is a list of potentially harmful characters that can be used
Even though MDI is considered harmful , several applications (even MS Office, Adobe apps)
As discussed in Eric Lippert's blog post Closing over the loop variable considered harmful
I have an issue with importing the scipy.special package. It isn't harmful, just annoying/interesting.
I just ran across Eric Lippert's Closing over the loop variable considered harmful via

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.