Re: Who owns a child view controller?
Re: Who owns a child view controller?
- Subject: Re: Who owns a child view controller?
- From: Jens Alfke <email@hidden>
- Date: Wed, 12 Jul 2017 17:36:12 -0700
> On Jul 12, 2017, at 2:03 PM, Greg Parker <email@hidden> wrote:
>
> The benefit of the autoreleasing convention comes when you can return an
> unretained value without a retain/autorelease pair, because you "know" that
> the object will live long enough for the callee to use it. This does in fact
> avoid lots of retain/release pairs in carefully written code.
Yes, this is what I was referring to. I’d forgotten that ARC won’t do this,
because it has to guarantee safety. In my pre-ARC code I routinely did this,
and only ran into problems with it a handful of times, so I felt it was a
valuable optimization (especially in the early 2000s when CPUs were slower.)
—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