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: Greg Parker <email@hidden>
- Date: Thu, 08 May 2014 17:26:51 -0700
On May 7, 2014, at 6:11 PM, Graham Cox <email@hidden> wrote:
> On 8 May 2014, at 10:39 am, Kyle Sluder <email@hidden> wrote:
>> Wait, why do you suspect this? Unless I missed something, there’s no guarantee, ARC or not, that a receiver will survive through a method invocation.
>
> How else could it work? -performSelector must hang on to the receiver at least until the method invocation, so any release must come afterwards, or an autorelease beforehand which means the release itself will be afterwards. If it was otherwise -performSelector would be crashing continually, which is not the behaviour observed.
Ordinary -performSelector: retains nothing. Other asynchronous variants like -performSelectorOnMainThread:… and -performSelector:…waitUntilDone:NO retain the receiver and the arguments.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
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