toggle quoted messageShow quoted text
Why are you making it autorelease?
Run your method, display and dispose of the alert and then while your app is still running click on the Memory Graph Debugger icon in the debug bar. Look at your allocations and leaks to see if any object of an NSAlert class is still there.
This will tell you if it’s needed or not.
On Feb 16, 2020, at 7:17 AM, Peter Hudson via Groups.Io <Peter.hudson@...
I see from the docs that when you create an NSAlert that you should dispose of it yourself.
My code for creating a simple alert and using it looks like this :-
NSAlert *alert = [[[NSAlert alloc] init] autorelease];
alert.messageText = @:Some message or other”;
[alert addButtonWithTitle:@"Create category"];
NSModalResponse choice = [alert runModal];
Is the use of an autorelease here O.K. ?
It certainly seems to work …..