Re: Deadlock during NSCache flush
Re: Deadlock during NSCache flush
- Subject: Re: Deadlock during NSCache flush
- From: Greg Parker <email@hidden>
- Date: Thu, 24 Oct 2013 04:08:28 -0700
On Oct 24, 2013, at 3:39 AM, Maxthon Chan <email@hidden> wrote:
> On Oct 24, 2013, at 18:23, Greg Parker <email@hidden> wrote:
>> On Oct 24, 2013, at 3:10 AM, Maxthon Chan <email@hidden> wrote:
>>> Neither is appropriate in my situation: Only one touch-up is needed so converting entire file (even just one method since it is extremely long) to MRR is is inappropriate
>>
>> Write a helper function in a separate non-ARC file.
>>
>> Do not call objc_retain or objc_release or objc_autorelease directly.
>
> And by the way, why not?
It's not published API. That should be a good enough reason.
The author of those functions is telling you not to. That is also typically a good reason.
The ARC optimizer will recognize your calls to these functions, assume they were generated by the ARC compiler, and possibly mis-optimize your code as a result. That is irrelevant given the first two reasons above, but may be helpful to know if you were hoping to just use them and get away with it.
> It is well documented in LLVM documentations that those functions are required to be identical to the corresponding methods.
The documentation says that their effect on the retain count is semantically equivalent to a message send. That does not mean you can call them yourself. That documentation is primarily instructions for implementers.
--
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