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: Michael Tsai <email@hidden>
- Date: Wed, 6 Feb 2008 10:12:43 -0500
On Feb 6, 2008, at 4:39 AM, John Engelhart wrote:
Read the above, "object" is synonymous for "struct". The "layout"
of an object is identical to the "layout" of a struct.
That is true but irrelevant. What matters for garbage collection is
whether the variables are typed as objects at compile time, because
that's what determines what code the compiler emits for assignments.
- (const char *)UTF8String; // Convenience to return null-
terminated UTF8 representation
Since the pointer that UTF8String returns is provably from
NSAllocateCollectable, this prototype has /DISCARDED/ the type
qualifier of __strong.
The API does not promise that -UTF8String returns a collectable
pointer. The current implementation may do so, but the documentation
says that you should copy the C string if you want to store it.
--Michael
_______________________________________________
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