Re: ARC and Manual Memory Management
Re: ARC and Manual Memory Management
- Subject: Re: ARC and Manual Memory Management
- From: Jens Alfke <email@hidden>
- Date: Mon, 10 Aug 2015 12:43:33 -0700
> On Aug 10, 2015, at 12:12 PM, Dave <email@hidden> wrote:
>
> If it just ignored those constructs, it was be much less confusing, simply because there would only one set of source code.
It would be a mess, honestly. If you build + test a source file with ARC it’d be very easy to break it for MRR by forgetting to add (or remove) retain/release calls. The idea with ARC is that you migrate forward to it, not try to keep one foot uncomfortably in both worlds. The compiler flag is there for you as an adapter if you have old source files you can’t update.
> release or dealloc are not guaranteed to do what is says on the tin anyway, I mean you can override them and do whatever you want.
You could, but if you broke their behavior that would be a bug. Just like you can override any other inherited method and make it do the wrong thing.
> Well, that wouldn’t work for categories on Cocoa objects, or would it? I’m beginning to think that using the flag is the best option
Yes. Just set the flag and go on with your life :)
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden