Re: *** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50
Re: *** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50
- Subject: Re: *** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50
- From: Graham Cox <email@hidden>
- Date: Mon, 25 Aug 2008 16:45:23 +1000
On 25 Aug 2008, at 4:24 pm, Graham Cox wrote:
On 25 Aug 2008, at 4:17 pm, Negm-Awad Amin wrote:
Don't care about this. IF it is a singleton, retaining is no
problem. IF it is NOT, retaining is the right way to handle it.
Sure, no problem for code I'm writing now.
Thing is, I never noticed this "tries to" before and always thought
this was a singleton. So I have shipped code that doesn't retain the
panel. It would be good to know if I'm just getting lucky *for now*
or whether that code is reliable.
The sample code in Apple's docs does NOT retain the save panel. The
example code for NSAlert similarly does not retain the alert - in fact
it explicitly autoreleases it which is what I'd expect a convenience
method to do if an individual instance were returned.
file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Conceptual/AppFileMgmt/Tasks/UsingASavePanel.html
Since the example is presumed correct and in practice I've never run
into a problem with this, it appears to be safe... in which case some
clarification about what "tries to" means would still be good.
Graham
_______________________________________________
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