Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
- Subject: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
- From: "Sean McBride" <email@hidden>
- Date: Wed, 6 Feb 2008 15:47:48 -0500
- Organization: Rogue Research
On 2/6/08 7:12 PM, Alastair Houghton said:
>Furthermore I *think* (and this is from memory, based on some work I
>did on GCC several years ago, so I might be wrong) that if you write
>something like
>
> void * __strong MyFunction(void);
>
>you'll find that the __strong attribute is attached to the *function*
>rather than to the type. In any case it's going to be ignored because
>__strong only really affects variables, not types or functions.
Well, NSAllocateCollectable is declared like so in NSZone.h:
FOUNDATION_EXPORT void *__strong NSAllocateCollectable(NSUInteger size,
NSUInteger options) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
And the comment just above says "the pointer type of the stored location
must be marked with the __strong attribute in order for the write-
barrier assignment primitive to be generated".
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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