Re: document-scoped bookmark

2017-07-14 Thread J.E. Schotsman
> On 14 Jul 2017, at 22:20, Quincey Morris > wrote: > > On Jul 14, 2017, at 11:57 , J.E. Schotsman wrote: >> >> I want to create document-scoped security bookmarks. >> However, there seems to be no API for this. > > Huh? It’s described

Re: Who owns a child view controller?

2017-07-14 Thread Quincey Morris
On Jul 14, 2017, at 11:43 , Greg Parker wrote: > > it would be deallocated after the callee relinquishes ownership and before > the caller can retake ownership See? I tried to reason about retain counts, and got it wrong. :) ___

Re: document-scoped bookmark

2017-07-14 Thread Quincey Morris
On Jul 14, 2017, at 11:57 , J.E. Schotsman wrote: > > I want to create document-scoped security bookmarks. > However, there seems to be no API for this. Huh? It’s described here:

document-scoped bookmark

2017-07-14 Thread J.E. Schotsman
Hello, I want to create document-scoped security bookmarks. However, there seems to be no API for this. On StackOverflow I’ve found two conflicting views: 1. Too bad, never implemented by Apple 2. Create the bookmark relative to the document. Can somebody please shed some light on this? TIA,

Re: Who owns a child view controller?

2017-07-14 Thread Greg Parker
> On Jul 14, 2017, at 10:59 AM, Quincey Morris > wrote: > >> On Jul 14, 2017, at 03:50 , Jeremy Hughes >> wrote: >> >> I’m still not entirely clear on when autorelease pools are used in Swift. > > I think about it this way:

Re: Who owns a child view controller?

2017-07-14 Thread Greg Parker
> On Jul 14, 2017, at 6:51 AM, Alex Zavatone wrote: > >> On Jul 14, 2017, at 5:50 AM, Jeremy Hughes >> wrote: >> >>> On 12 Jul 2017, at 17:41, Jens Alfke wrote: >>> On Jul 12, 2017, at 9:34 AM, Jeremy Hughes

Re: Who owns a child view controller?

2017-07-14 Thread Quincey Morris
On Jul 14, 2017, at 03:50 , Jeremy Hughes wrote: > > I’m still not entirely clear on when autorelease pools are used in Swift. I think about it this way: Autorelease is the run-time feature that provides an atomic return. There is no such thing as an “atomic”

Re: Who owns a child view controller?

2017-07-14 Thread John McCall
> On Jul 14, 2017, at 12:22 PM, Charles Srstka wrote: >> On Jul 14, 2017, at 10:09 AM, Jeremy Hughes >> wrote: >> >>> On 14 Jul 2017, at 14:40, Steve Christensen >> > wrote: >>> >>> On Jul 14,

Re: Who owns a child view controller?

2017-07-14 Thread Quincey Morris
On Jul 14, 2017, at 03:32 , Jeremy Hughes wrote: > > one might argue that safe unowned objects could be replaced by > unowned(unsafe) objects in release code It’s highly desirable not to do that, because it’s the bugs that show up in release code that are the

Re: Who owns a child view controller?

2017-07-14 Thread Steve Christensen
On Jul 14, 2017, at 8:09 AM, Jeremy Hughes wrote: > >> On 14 Jul 2017, at 14:40, Steve Christensen wrote: >> >> On Jul 14, 2017, at 3:50 AM, Jeremy Hughes >> wrote: >>> >>> I’m still not entirely clear on when

Re: Who owns a child view controller?

2017-07-14 Thread Charles Srstka
> On Jul 14, 2017, at 10:09 AM, Jeremy Hughes > wrote: > >> On 14 Jul 2017, at 14:40, Steve Christensen > > wrote: >> >> On Jul 14, 2017, at 3:50 AM, Jeremy Hughes >

Re: Who owns a child view controller?

2017-07-14 Thread Jeremy Hughes
> On 14 Jul 2017, at 14:40, Steve Christensen wrote: > > On Jul 14, 2017, at 3:50 AM, Jeremy Hughes > 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

Re: Who owns a child view controller?

2017-07-14 Thread Charles Srstka
> On Jul 14, 2017, at 8:51 AM, Alex Zavatone wrote: > > >> On Jul 14, 2017, at 5:50 AM, Jeremy Hughes >> wrote: >> >>> On 12 Jul 2017, at 17:41, Jens Alfke wrote: >>> On Jul 12, 2017, at 9:34 AM, Jeremy Hughes

Re: Who owns a child view controller?

2017-07-14 Thread Alex Zavatone
> On Jul 14, 2017, at 5:50 AM, Jeremy Hughes > wrote: > >> On 12 Jul 2017, at 17:41, Jens Alfke wrote: >> >>> On Jul 12, 2017, at 9:34 AM, Jeremy Hughes >>> wrote: >>> >>> // Prints "Why is childReference not

Re: Who owns a child view controller?

2017-07-14 Thread Steve Christensen
On Jul 14, 2017, at 3:50 AM, Jeremy Hughes 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

Re: Who owns a child view controller?

2017-07-14 Thread Alastair Houghton
On 14 Jul 2017, at 12:03, Jeremy Hughes wrote: > >> On 13 Jul 2017, at 20:29, Alex Zavatone wrote: >> >> One thing that I had to learn was to break my expectations of when a view >> controller (one that is tied to a navigationController) is

Re: Who owns a child view controller?

2017-07-14 Thread Jeremy Hughes
> On 13 Jul 2017, at 20:29, Alex Zavatone wrote: > > One thing that I had to learn was to break my expectations of when a view > controller (one that is tied to a navigationController) is deallocated. I’m not sure that view controllers are special. My understanding is that

Re: Who owns a child view controller?

2017-07-14 Thread Jeremy Hughes
> On 12 Jul 2017, at 17:41, Jens Alfke wrote: > >> On Jul 12, 2017, at 9:34 AM, Jeremy Hughes >> wrote: >> >> // Prints "Why is childReference not nil?” > > There may still be a reference in the autorelease pool. Check childReference > again

Re: Who owns a child view controller?

2017-07-14 Thread Jeremy Hughes
> On 13 Jul 2017, at 19:43, Quincey Morris > wrote: > > Here’s how I understand the situation in Swift. As usual, I may have some > things a bit wrong, but I think this is right. There are four kinds of > reference variable (or stored property) in Swift: >

Re: Who owns a child view controller?

2017-07-14 Thread Saagar Jha
I don't think view controllers are actually unloaded under memory pressure anymore. I think I remember reading about that somewhere, but I'll have to go hunt for it again. On Thu, Jul 13, 2017 at 12:29 Alex Zavatone wrote: > One thing that I had to learn was to break my