Re: NSFileWrapper - is this really so bad?
Re: NSFileWrapper - is this really so bad?
- Subject: Re: NSFileWrapper - is this really so bad?
- From: Charles Srstka <email@hidden>
- Date: Tue, 27 Oct 2015 20:25:35 -0500
> On Oct 27, 2015, at 7:08 PM, Graham Cox <email@hidden> wrote:
>
>> On 28 Oct 2015, at 10:53 AM, Alex Kac <email@hidden <mailto:email@hidden>> wrote:
>>
>> Have you tried simply passing in a blank dictionary? Is that OK?
>
>
> Yes, that works OK. It’s at least a simple way to shut the warning up, though strikes me as unnecessary and inefficient, FWIW.
It’s not that inefficient, given that an immutable empty array or dictionary is just going to end up being a shared instance anyway, rather than actually allocating and deallocating an object. The only costs should be asking the container if it’s empty, and the usual ARC retain/release stuff.
Charles
_______________________________________________
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