• 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: Roland King <email@hidden>
  • Date: Wed, 1 Sep 2010 00:34:45 +0800

Thanks for the confirmation ... in this case I'm doing Middles Ages iOs memory managed code so definitely not dual mode.

Of course I now have to ask if I *were* doing it .. what's the issue? Is it that autorelease doesn't do anything so the CF type never gets the CFRelease() call it would do from a real -release? What does CFMakeCollectable() do if you are memory managed .. nothing? These are things I've not had to worry about but you piqued my interest.

On 01-Sep-2010, at 12:24 AM, Dave DeLong wrote:

> 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.
> _______________________________________________
>
> 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

_______________________________________________

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: David Duncan <email@hidden>
    • Re: can you autorelease toll-free bridged types
      • From: "Sean McBride" <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>)
 >Re: can you autorelease toll-free bridged types (From: Dave DeLong <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