• 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: Core Foundation types as properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Foundation types as properties


  • Subject: Re: Core Foundation types as properties
  • From: email@hidden
  • Date: Sun, 29 Mar 2015 15:12:55 +0900

Interesting.
So is there a generalized best practice?

Sent from my iPhone

> On 2015/03/29, at 14:42, David Duncan <email@hidden> wrote:
>
>
>> On Mar 28, 2015, at 9:41 PM, email@hidden wrote:
>>
>> See this
>>
>> http://stackoverflow.com/questions/9274397/retained-core-foundation-property
>
> __attribute__((NSObject)) is not recommended, as it doesn’t necessarily cause the behavior you want in all cases. Basically the attribute can get disassociated from the underlying type, and thus “lose” the NSObject-ness, causing the handling you desire to be lost.
>
>>
>>
>>
>> Sent from my iPhone
>>
>>> On 2015/03/29, at 12:16, Graham Cox <email@hidden> wrote:
>>>
>>> Just a general question:
>>>
>>> What do people do about properties that are CF type objects (both ARC and non-ARC)? Typically I want these retained, but that doesn't work, at least in non-ARC code, because CF types aren't recognised as being retainable. So I declare them as 'assign' but usually leave a comment that it's really copied, CFRetain'd, etc. (and of course I have to write the setter methods myself to make that true). Is that my only option? It would be nice if this were better supported.
>>>
>>> --Graham
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> 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
>
> --
> David Duncan
>
_______________________________________________

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: Core Foundation types as properties
      • From: David Duncan <email@hidden>
References: 
 >Core Foundation types as properties (From: Graham Cox <email@hidden>)
 >Re: Core Foundation types as properties (From: email@hidden)
 >Re: Core Foundation types as properties (From: David Duncan <email@hidden>)

  • Prev by Date: Re: Core Foundation types as properties
  • Next by Date: setFrame doesn't work if I put the view into UINavigationController?
  • Previous by thread: Re: Core Foundation types as properties
  • Next by thread: Re: Core Foundation types as properties
  • Index(es):
    • Date
    • Thread