Re: mutableBytes Creates Autoreleased Objects
Re: mutableBytes Creates Autoreleased Objects
- Subject: Re: mutableBytes Creates Autoreleased Objects
- From: Quincey Morris <email@hidden>
- Date: Sat, 12 May 2012 13:44:33 -0700
On May 12, 2012, at 12:56 , Jens Alfke wrote:
> No; -[NSString UTF8String] returns a char*, not an object.
I meant "object" in the more general sense of a block of allocated memory whose lifetime is managed by a memory model. That includes (at least):
1. Obj-C objects.
2. CF…Ref objects.
3. A few special cases such as UTF8String, where the block is (apparently) autoreleased to keep it from deallocating instantly.
(In the GC case, these "objects" are blocks managed by the collector.)
_______________________________________________
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