On Fri, 23 Sep 2011 22:08:43 -0700, Jerry Krinock <je...@ieee.org> said:
>Yes. After studying this some more I see that, in older code, I did not >declare outlets as properties. Instead, I put the IBOutlet directive on the >ivar, > >@interface MyWinCon : NSWindowController >{ > IBOutlet FooView *m_fooView ; >} I would just add (perhaps unnecessarily) that on iOS, where KVC is used, one should not be tempted to use a pure ivar instead of property + synthesized accessor, because when KVC sets an ivar directly it retains it and your whole memory management scheme can be thrown off. (This is just one of many reasons why direct KVC access to ivars is scary.) The property, with its declared memory management policy, and the synthesized accessor that implements that policy, acts as a memory management gateway to ward off KVC's curious and probably unwanted memory management behavior. I don't remember whether there are similar memory management considerations on OS X, but presumably not. m. -- matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/> A fool + a tool + an autorelease pool = cool! Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook_______________________________________________ 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 arch...@mail-archive.com