Re: Who owns a child view controller?
Re: Who owns a child view controller?
- Subject: Re: Who owns a child view controller?
- From: Jeremy Hughes <email@hidden>
- Date: Wed, 12 Jul 2017 21:34:26 +0100
> On 12 Jul 2017, at 19:24, Jens Alfke <email@hidden> wrote:
>
>> While that’s true, the main reason, as I understand it, that ARC doesn’t
>> know enough about the object’s lifetime is that non-ARC code may be calling
>> the method. In an all-ARC world, a method could always just return objects
>> with a +1 retain count, and the consumer could just assume that and always
>> balance the retain.
>
> It could, but that results in _enormous_ numbers of retain/release calls. (I
> speak from some experience, having once worked on performance optimization of
> a project that did ref-counting this way.)
But an ARC compiler is smart enough to optimise these calls out of existence
(in many cases).
Jeremy
_______________________________________________
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