Re: can you autorelease toll-free bridged types
Re: can you autorelease toll-free bridged types
- Subject: Re: can you autorelease toll-free bridged types
- From: Dave DeLong <email@hidden>
- Date: Tue, 31 Aug 2010 10:24:04 -0600
If you are writing dual-mode code, can't you just wrap the CFDictionaryCreateMutable() call with CFMakeCollectable()?
Dave
On Aug 31, 2010, at 10:20 AM, Mike Abdullah wrote:
> On 31 Aug 2010, at 17:02, Roland King wrote:
>
>> can you do this?
>>
>> CFMutableDictionaryRef tokenByParent = CFDictionaryCreateMutable( NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks );
>> [ (NSMutableDictionary*)tokenByParent autorelease ];
>>
>
> Yes, provided you are not writing dual-mode GC/manual memory management code. The Static Analyzer will do a good job warning you of this anyhow.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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