• 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: NSAttributedString crashes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAttributedString crashes


  • Subject: Re: NSAttributedString crashes
  • From: Matt Neuburg <email@hidden>
  • Date: Thu, 03 Mar 2011 19:49:52 -0800

On Mar 3, 2011, at 7:32 PM, Graham Cox wrote:

> On 04/03/2011, at 11:54 AM, Matt Neuburg wrote:
>
>> because NSString is a very, very special case. Memory management for strings is utterly different from memory management for a normal object
>
>
> Is it?
>
> Are you basing this on your observations, or on some documentation?

Well, I may have put it rather too strongly - string literals are special, is what I meant. But many strings start life as a literal. I'm not saying one should *treat* them differently - indeed, doing that is a good way to get into trouble. I'm just saying that if you peek at the man behind the curtain (the retain count) they can be surprising - like the retain count for stringWithString:@"hello". At one point I needed to make a string with a "normal" retain count (for a teaching example) and had quite a bit of trouble working out how to do it. m._______________________________________________

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

References: 
 >Re: NSAttributedString crashes (From: Matt Neuburg <email@hidden>)
 >Re: NSAttributedString crashes (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: NSAttributedString crashes (From: Kyle Sluder <email@hidden>)
 >Re: NSAttributedString crashes (From: Matt Neuburg <email@hidden>)
 >Re: NSAttributedString crashes (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: NSAttributedString crashes
  • Next by Date: Re: NSAttributedString crashes
  • Previous by thread: Re: NSAttributedString crashes
  • Next by thread: Re: NSAttributedString crashes
  • Index(es):
    • Date
    • Thread