• 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: "Gerriet M. Denkmann" <email@hidden>
  • Date: Tue, 01 Mar 2011 16:15:09 +0700

On 1 Mar 2011, at 15:53, Kyle Sluder wrote:

> On Tue, Mar 1, 2011 at 12:45 AM, Gerriet M. Denkmann
> <email@hidden> wrote:
>> So obviously NSAttributedString does NOT return [ [ aFont retain ] autorelease ] but just some internal pointer.
>>
>> Is this documented somewhere?
>
> In the Memory Management Programming Guide:
> http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/MemoryMgmt/Articles/mmAccessorMethods.html#//apple_ref/doc/uid/TP40003539-SW6
>
> --Kyle Sluder

As far as I can see, this article talks about different ways to implement setters and getters.
Do you want to imply that, whenever I get some object from AppKit, I have to retain it until I no longer need it?

Would be a safe thing to do. But also tedious. And in all my past experience this was never necessary.
So I thought that the "Technique 1" of the linked article (returning [[someObject retain] autorelease]) was the standart practice employed by AppKit.

Kind regards,

Gerriet.

_______________________________________________

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: NSAttributedString crashes
      • From: Kyle Sluder <email@hidden>
References: 
 >NSAttributedString crashes (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: NSAttributedString crashes (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: How to find unencoded characters
  • Next by Date: Re: NSAttributedString crashes
  • Previous by thread: Re: NSAttributedString crashes
  • Next by thread: Re: NSAttributedString crashes
  • Index(es):
    • Date
    • Thread