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 (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com