• 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: Who owns a child view controller?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Who owns a child view controller?


  • Subject: Re: Who owns a child view controller?
  • From: Charles Srstka <email@hidden>
  • Date: Fri, 14 Jul 2017 11:22:47 -0500

> On Jul 14, 2017, at 10:09 AM, Jeremy Hughes <email@hidden>
> wrote:
>
>> On 14 Jul 2017, at 14:40, Steve Christensen <email@hidden
>> <mailto:email@hidden>> wrote:
>>
>> On Jul 14, 2017, at 3:50 AM, Jeremy Hughes <email@hidden
>> <mailto:email@hidden>> wrote:
>>>
>>> I’m still not entirely clear on when autorelease pools are used in Swift.
>>> There is a WWDC video which says that they’re used in code that interfaces
>>> with Objective-C, but Greg Parker’s comments in this thread indicate that
>>> autorelease is also used behind the scenes in native Swift code - except
>>> that in many cases the compiler is able to optimise it out of existence.
>>> Apple’s Swift book doesn’t mention autorelease.
>>
>> I think the hazard here is that you are trying to build a mental model of
>> when to expect autorelease pools (or autorelease behavior in general) and
>> when not to. Worse, that you might design your code to fit those
>> expectations.
>
> Apple’s documentation states that there are times that you do want to
> consider the memory effects of autorelease pools (and suggests adding your
> own pools to prevent large accumulations of dead objects during loops) - so
> knowing when they are used isn’t irrelevant.
>
> Also, ARC is described as “deterministic” - which I’m possibly
> misinterpreting as meaning "behaves in a predictable way".
>
> Jeremy

I’d interpret it as “behaves in a consistent way.” Predictable is subjective,
especially when autorelease pools are involved.

Charles

_______________________________________________

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

  • Follow-Ups:
    • Re: Who owns a child view controller?
      • From: John McCall <email@hidden>
References: 
 >Who owns a child view controller? (From: Jeremy Hughes <email@hidden>)
 >Re: Who owns a child view controller? (From: Jens Alfke <email@hidden>)
 >Re: Who owns a child view controller? (From: Jeremy Hughes <email@hidden>)
 >Re: Who owns a child view controller? (From: Steve Christensen <email@hidden>)
 >Re: Who owns a child view controller? (From: Jeremy Hughes <email@hidden>)

  • Prev by Date: Re: Who owns a child view controller?
  • Next by Date: Re: Who owns a child view controller?
  • Previous by thread: Re: Who owns a child view controller?
  • Next by thread: Re: Who owns a child view controller?
  • Index(es):
    • Date
    • Thread