• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
reused tableViewCell UILabel text is deallocated but not nil ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reused tableViewCell UILabel text is deallocated but not nil ??


  • Subject: reused tableViewCell UILabel text is deallocated but not nil ??
  • From: Nicolas Berloquin <email@hidden>
  • Date: Thu, 7 Oct 2010 16:09:06 +0200

Hi !

I have a UITableView that creates/reuses tableViewCells (
UITableViewCellStyleDefault) on demand, as is usually done,
ie cellForRowAtIndexPath: uses the same cells over and over.
When I delete a few rows, then add a new one, I crash when I try to set the
cell's UILabel (right after the cell reuse):


cell.textLabel.text = myName.titre;

I turned on zombies, and I checked with the debugger, and the textLabel's
_text is the deallocated instance
(myName.titre is good).

*** -[CFString class]: message sent to deallocated instance 0x17c370

Since I'm not handling the cell's contents myself, I don't understand how
the textLabel can become garbage.
the text field is supposed to be copied on assignement...

Is this a known sdk bug ? (iOS 4.1)

thanks !
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: reused tableViewCell UILabel text is deallocated but not nil ??
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: what are the scenarios for an app to be terminated?
  • Next by Date: Re: Let the runloop process its queue during a long operation
  • Previous by thread: Re: coreData fetch ok in Sim but nil on device
  • Next by thread: Re: reused tableViewCell UILabel text is deallocated but not nil ??
  • Index(es):
    • Date
    • Thread