Le 6 juil. 08 à 14:45, Bill Cheeseman a écrit :
on 2008-07-06 2:45 AM, Quincey Morris at [EMAIL PROTECTED] wrote:It also occurs to me that the OP is going to have to be careful todocument the behavior of methods in *his* framework that return new CFobjects (if there are any). He'll have to decide whether to use CF rules (retain count == 1), Cocoa rules (retain count == 1 or autoreleased object, depending on whether the caller or the frameworkis regarded as the owner of the new object), or to return an object onwhich CFMakeCollectable has already been called.Actually, I (the OP) am receiving inconsistent advice privately regarding the original question (the OQ?), namely, whether to use the __strong keyword when declaring an instance variable with a CFType-derived type. Privately, Ihave been told by a knowledgeable developer that I do NOT need to use__strong, if I have been careful in my framework to balance my calls to CFRetain and CFRelease. He even goes so far as to suggest that it would be dangerous or at least inefficient to use __strong in a mixed environmentsuch as a shared framework that supports both garbage collection and retain/release, due in part to the additional overhead.
If __strong is so dangerous, why is it used in Cocoa (see NSDrawer, NSDateFormatter, NSNumberFormatter, NSKeyedArchiver, NSURL, …) ?
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]