• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ARC and Manual Memory Management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >ARC and Manual Memory Management (From: Dave <email@hidden>)
 >Re: ARC and Manual Memory Management (From: Uli Kusterer <email@hidden>)
 >Re: ARC and Manual Memory Management (From: Dave <email@hidden>)

  • Prev by Date: Re: ARC and Manual Memory Management
  • Next by Date: Re: ARC and Manual Memory Management
  • Previous by thread: Re: ARC and Manual Memory Management
  • Next by thread: Re: ARC and Manual Memory Management
  • Index(es):
    • Date
    • Thread