Re: Document being reopened on launch during modal dialog
Re: Document being reopened on launch during modal dialog
- Subject: Re: Document being reopened on launch during modal dialog
- From: Quincey Morris <email@hidden>
- Date: Wed, 07 May 2014 17:07:24 -0700
On May 7, 2014, at 15:08 , Mills, Steve <email@hidden> wrote:
> Is this all safe and legal, releasing self right before it returns to whatever called it?
I believe it’s safe in manual RR, though you could perhaps do ‘[self autorelease]’ if you feel uncertain. I’m not sure it’d be safe under ARC (that is, doing something that could cause ‘self’ to be deallocated), because ARC might have epilogue code at the end of the scope, and that *might* refer to self.
However, it’s probably safe for a different reason. ‘performSelector’ should retain its receiver, and presumably won’t release it until after the performed method returns, so your ‘[self release]’ presumably won’t actually result in deallocation.
_______________________________________________
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