On 27.08.2016 at 23:54 Quincey Morris wrote: > On Aug 27, 2016, at 13:55 , Andreas Falkenhahn <andr...@falkenhahn.com> wrote: > > I still don't know whether setting the delegate to nil > before release is a general rule or does it only apply to NSTableView? > > It’s not clear what delegate you mean by “button delegate”, but it > doesn’t really matter.
Oops, I meant the button target as Kyle has already pointed out. > Incidentally, while it might be a noble goal to have your software > support OS versions all the way back to 10.6 or 10.5 Just 10.6 for x86. 10.4 for PowerPC but the PowerPC version of my app uses Carbon anyway. > Lastly, I may have lost track of things during the series of > threads we’ve had about memory management in your app, but I can’t > now understand why you don’t adopt ARC. I guess I thought it was > because you were maintaining existing code, which presumably did its > manual memory management properly. But if you’re writing new code, > or even updating old code, there is literally no downside (AFAIK) in > switching to ARC. Isn’t it a positive upside in source files shared > between Mac and other platforms of your app, to not need retain and > release calls? Note also that ARC and manual memory management can > be intermixed in the same target freely (though not in the same > source file), provided the existing manual memory management does follow the > rules. > Since you’re not 100% familiar with the rules, why not just switch to ARC? The actual Cocoa code in my app is really just a few kilobytes. It's not complicated at all so there is no pressure to simplify things by using ARC. If this was a huge project with lots of new code to be written, it would be a different matter, but it's really just a few lines. So it's a nice exercise for understanding manual memory management with Cocoa. Of course, I might switch to ARC sooner or later but I first like to learn and understand the old way of doing things... maybe this also helps me to appreciate ARC more once I start using it ;) -- Best regards, Andreas Falkenhahn mailto:andr...@falkenhahn.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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com