on 2008-07-06 9:49 AM, Jean-Daniel Dupas at [EMAIL PROTECTED] wrote: > If __strong is so dangerous, why is it used in Cocoa (see NSDrawer, > NSDateFormatter, NSNumberFormatter, NSKeyedArchiver, NSURL, ) ?
Those are interesting examples, especially NSDrawer. In NSDrawer, only the CFRunLoopTimerRef and CFRunLoopObserverRef iVars are given the __strong keyword, while the CFRunLoopRef iVar is not. This suggests to me that some very refined thinking is going on as to when to use or not to use the __strong keyword. I wish I knew what all the relevant considerations were. In NSURL, the void *_reserved iVar is given the __strong keyword, which doesn't tell us much since _reserved may not be used at all. Ditto NSKeyedArchiver. In NSDateFormatter, a CFDateFormatterRef iVar is given the __strong keyword. This seems consistent with your point, but I am still haunted by the fact that NSDrawer's CFRunLoopRef iVar is not given the __strong keyword. Ditto NSNumberFormatter. -- Bill Cheeseman - [EMAIL PROTECTED] Quechee Software, Quechee, Vermont, USA www.quecheesoftware.com PreFab Software - www.prefabsoftware.com _______________________________________________ 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]