• 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
Re: reused tableViewCell UILabel text is deallocated but not nil ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reused tableViewCell UILabel text is deallocated but not nil ??


  • Subject: Re: reused tableViewCell UILabel text is deallocated but not nil ??
  • From: glenn andreas <email@hidden>
  • Date: Thu, 07 Oct 2010 11:38:48 -0500

On Oct 7, 2010, at 11:30 AM, nicolas berloquin wrote:
>>
>>> I turned on zombies, and I checked with the debugger, and the textLabel's
>>> _text is the deallocated instance
>>> (myName.titre is good).
>>
>> This may be a red herring as the state of _text should not effect the ability to assign the property value, generally speaking.
>
> Unless they compare the strings before they replace them which is what they seem to do.
>
> I have changed my code to do a copy o the string before I assign it to the label and it works. What I don't understand is why the API doesn't either retain or copy it !!
>

It probably does (and so needs to send a release to the old value).  What is likely happening is that you've got your memory management screwed up somewhere, and are over-releasing the (what will be the old) string value, which causes the text fields text ivar to point to garbage.


Glenn Andreas                      email@hidden
The most merciful thing in the world ... is the inability of the human mind to correlate all its contents - HPL

_______________________________________________

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: nicolas berloquin <email@hidden>
References: 
 >reused tableViewCell UILabel text is deallocated but not nil ?? (From: Nicolas Berloquin <email@hidden>)
 >Re: reused tableViewCell UILabel text is deallocated but not nil ?? (From: Keary Suska <email@hidden>)
 >Re: reused tableViewCell UILabel text is deallocated but not nil ?? (From: nicolas berloquin <email@hidden>)

  • Prev by Date: Re:[Solution] Preventing a window from moving while dragging a view.
  • Next by Date: Re: reused tableViewCell UILabel text is deallocated but not nil ??
  • Previous by thread: Re: reused tableViewCell UILabel text is deallocated but not nil ??
  • Next by thread: Re: reused tableViewCell UILabel text is deallocated but not nil ??
  • Index(es):
    • Date
    • Thread