On Jan 20, 2011, at 9:39 PM, Corbin Dunn wrote: > Now for something like a button, it obviously won't run into this type of > latent drawing issue, since they don't message the delegate every time they > draw. However, if you temporarily allocated an object and set it as the > target/action of a button, and then free that object while the button is > still visible, then yes, that's a case where you want to reset it to nil.
I don't know why I had it in my mind that targets are retained. If they were, they'd run into the same retain cycles as delegates would if *they* were retained. I think it would be going to extremes to nil out button targets in dealloc. I think a common-sense approach is best after all, and I retracted the bug I mentioned earlier because checking delegates for == self should be up to the discretion of the programmer. Can't hurt to do it, but it almost certainly won't matter. --Andy _______________________________________________ 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