Re: NSAutoreleasePool drain/dealloc

2018-03-06 Thread David Chisnall
On 6 Mar 2018, at 17:24, Richard Frith-Macdonald wrote: > > I think the -drain method name is unintuitive. To me it sounds like it ought > to do the same as the gnustep-specific -emptyPool method (a more efficient > equivalent to draining/releasing the pool and immediately creating a new one)

Re: NSAutoreleasePool drain/dealloc

2018-03-06 Thread Ivan Vučica
On Tue, Mar 6, 2018 at 5:24 PM, Richard Frith-Macdonald < richard.frith-macdon...@theengagehub.com> wrote: > > > According to Apple, the -drain method is a synonym for -release (or > -dealloc since you don't retain autorelease pools). > So yes, if youi drain a pool the next time an object is autor

Re: NSAutoreleasePool drain/dealloc

2018-03-06 Thread Richard Frith-Macdonald
> On 6 Mar 2018, at 17:08, Ivan Vučica wrote: > > Hi, > > I was explaining refcounting and NSAutoreleasePool to someone, and I thought > referencing GNUstep might be useful to explain the correct mental model of > the behavior. > > But I'm confused about -drain in the non-ARC implementation