• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mutableArrayValueForKey: truth or dare
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mutableArrayValueForKey: truth or dare


  • Subject: Re: mutableArrayValueForKey: truth or dare
  • From: Mike Abdullah <email@hidden>
  • Date: Thu, 17 Jun 2010 18:10:03 +0100

On 17 Jun 2010, at 17:47, Matt Neuburg wrote:

> There is an assertion often encountered in people's blogs, answers to
> questions on forums, etc., that the proxy object provided by
> mutableArrayValueForKey: is inefficient

This is wrong. The proxy only occurs a slight performance penalty over direct calling the accessor methods (in most cases 1 message send)

> - in particular, that if you don't
> also implement -countOfItems, -objectInItemsAtIndex:,
> -insertObject:inItemsAtIndex:, and -removeObjectFromItemsAtIndex:,
> then every change in the mutable array through the proxy replaces the whole
> array. Is this true? Thx - m.

This is true. How else could the proxy do its work? The docs are pretty helpful on how the proxy decides what to do.

Mike._______________________________________________

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

  • Follow-Ups:
    • Re: mutableArrayValueForKey: truth or dare
      • From: Ken Thomases <email@hidden>
References: 
 >mutableArrayValueForKey: truth or dare (From: Matt Neuburg <email@hidden>)

  • Prev by Date: mutableArrayValueForKey: truth or dare
  • Next by Date: Re: Add button to Finder
  • Previous by thread: mutableArrayValueForKey: truth or dare
  • Next by thread: Re: mutableArrayValueForKey: truth or dare
  • Index(es):
    • Date
    • Thread