ARC query
ARC query
- Subject: ARC query
- From: Jonathan Mitchell <email@hidden>
- Date: Wed, 07 Jan 2015 15:32:39 +0000
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];
alert.alertStyle = NSWarningAlertStyle;
alert.messageText = @“Do not touch!";
[alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {
[alert orderOut:self];
}];
Jonathan
_______________________________________________
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