Re: NSAttributedString crashes
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