• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: can you autorelease toll-free bridged types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: can you autorelease toll-free bridged types
      • From: Roland King <email@hidden>
References: 
 >can you autorelease toll-free bridged types (From: Roland King <email@hidden>)
 >Re: can you autorelease toll-free bridged types (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: can you autorelease toll-free bridged types
  • Next by Date: Re: can you autorelease toll-free bridged types
  • Previous by thread: Re: can you autorelease toll-free bridged types
  • Next by thread: Re: can you autorelease toll-free bridged types
  • Index(es):
    • Date
    • Thread