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: "Hamish Allan" <email@hidden>
- Date: Wed, 6 Feb 2008 17:52:58 +0000
On Feb 6, 2008 2:59 PM, John Engelhart <email@hidden> wrote:
> "I'll take 'Not relevant' for $200 and 'Misunderstands the
> fundamentals' for the win, Alex."
Speaking of "not relevant" and "misunderstands the fundamentals":
1) UTF8String returns a non-__strong pointer.
2) You fail to copy the data at that pointer.
3) You cry foul when that data disappears.
> A garbage collection systems sine qua non is to free the programmer
> from having to deal with the issues memory allocation.
Exactly. So stop getting your knickers in a twist about whether or not
UTF8String actually returns memory from NSAllocateCollectable(), and
simply copy the result as required by the documentation for
UTF8String.
Hamish
_______________________________________________
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