Re: How determine if file is in Trash, given Path or Alias
Re: How determine if file is in Trash, given Path or Alias
- Subject: Re: How determine if file is in Trash, given Path or Alias
- From: Michael Ash <email@hidden>
- Date: Tue, 2 Jun 2009 22:17:54 -0400
On Tue, Jun 2, 2009 at 2:09 PM, Sean McBride <email@hidden> wrote:
> On 6/1/09 9:31 PM, Quincey Morris said:
>
>>The description of [NSString UTF8String] says
>>that "the returned C string is automatically freed just as a returned
>>object would be released", which implies (to me) that the returned
>>pointer is to GC-controlled memory.
>
> Then shouldn't its return value be __strong? (It's not.)
Not really. __strong has no meaning when applied to function/method
return values (or arguments or local variables). It doesn't break
anything, but it also doesn't do anything. __strong only changes how
things work when applied to heap memory, such as instance variables,
or structs that you've malloced memory for.
It would be sensible to use __strong as a decorator for non-object
pointer return values to indicate that they are GC-allocated memory,
purely out of convention, but as far as I know such a convention is
not established in the API as of 10.5.
Mike
_______________________________________________
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