Re: ARC query

2015-01-09 Thread Glenn L. Austin
On Jan 7, 2015, at 1:11 PM, Mike Abdullah mabdul...@karelia.com wrote: On 7 Jan 2015, at 20:55, Sean McBride s...@rogue-research.com wrote: On Wed, 7 Jan 2015 12:02:16 -0600, Ken Thomases said: Short answer: yes, the alert is retained. Meaning that one must use the weak/strong dance

Re: ARC query

2015-01-07 Thread Sean McBride
On Wed, 7 Jan 2015 12:02:16 -0600, Ken Thomases said: Short answer: yes, the alert is retained. Meaning that one must use the weak/strong dance pattern like this? NSAlert *alert = [NSAlert new]; alert.alertStyle = NSWarningAlertStyle; alert.messageText = @“Do not touch!; __weak NSAlert*

Re: ARC query

2015-01-07 Thread Mike Abdullah
On 7 Jan 2015, at 20:55, Sean McBride s...@rogue-research.com wrote: On Wed, 7 Jan 2015 12:02:16 -0600, Ken Thomases said: Short answer: yes, the alert is retained. Meaning that one must use the weak/strong dance pattern like this? NSAlert *alert = [NSAlert new]; alert.alertStyle =

Re: ARC query

2015-01-07 Thread Clark S. Cox III
On Jan 7, 2015, at 12:55, Sean McBride s...@rogue-research.com wrote: On Wed, 7 Jan 2015 12:02:16 -0600, Ken Thomases said: Short answer: yes, the alert is retained. Meaning that one must use the weak/strong dance pattern like this? No. The weak/strong dance would only be needed if

Re: ARC query

2015-01-07 Thread Ken Thomases
On Jan 7, 2015, at 9:32 AM, Jonathan Mitchell jonat...@mugginsoft.com wrote: I use this construct quite a lot without really thinking about it under ARC I don’t retain a reference to the alert. Does -beginSheetModalForWindow: completionHandler: cause the receiver to be retained until after

ARC query

2015-01-07 Thread Jonathan Mitchell
I use this construct quite a lot without really thinking about it under ARC I don’t retain a reference to the alert. Does -beginSheetModalForWindow: completionHandler: cause the receiver to be retained until after the completion handler returns? NSAlert *alert = [NSAlert new];