Re: NSWindow Subclass close/dealloc question

2015-04-02 Thread Dave
> > No, then the window will be uncloseable. What needs to be different > depending on that property is whether you call -release, not whether you pass > the -close call up to super. If you're using ARC, you don't get to control > whether you call release. Therefore, you need to set released

Re: NSWindow Subclass close/dealloc question

2015-04-02 Thread Ken Thomases
On Apr 2, 2015, at 11:53 AM, Dave wrote: > On 2 Apr 2015, at 17:09, Ken Thomases wrote: >> >> On Apr 2, 2015, at 10:56 AM, Dave wrote: >> >>> I’m getting a crash in dealloc in an NSWindow Subclass. >> >>> If I run this, then I get a crash when the autorelease pool is drained. >>> However, i

Re: NSWindow Subclass close/dealloc question

2015-04-02 Thread Dave
> On 2 Apr 2015, at 17:09, Ken Thomases wrote: > > On Apr 2, 2015, at 10:56 AM, Dave wrote: > >> I’m getting a crash in dealloc in an NSWindow Subclass. > >> If I run this, then I get a crash when the autorelease pool is drained. >> However, if I take out the line: >> >> [super close]; >>

Re: NSWindow Subclass close/dealloc question

2015-04-02 Thread Ken Thomases
On Apr 2, 2015, at 10:56 AM, Dave wrote: > I’m getting a crash in dealloc in an NSWindow Subclass. > If I run this, then I get a crash when the autorelease pool is drained. > However, if I take out the line: > > [super close]; > > in my close method, all works fine. > > Is this expected? If

NSWindow Subclass close/dealloc question

2015-04-02 Thread Dave
Hi, I’m getting a crash in dealloc in an NSWindow Subclass. I have a class that creates and closes Windows based on Notifications received from elsewhere. One of the Notifications is “CloseWindow”. I added this to my subclass: -(void) close { LogIfDave(@"Overlay close"); [super close];