• 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: ARC + CF types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ARC + CF types


  • Subject: Re: ARC + CF types
  • From: Greg Parker <email@hidden>
  • Date: Mon, 29 Aug 2011 12:00:21 -0700

On Aug 29, 2011, at 9:43 AM, Dave Zarzycki wrote:
> Or, your code could subclass NSMutableSet and interpose the methods that add to the set. In other words, mentally separate "objects that are equal" from "objects that should be in the set". The former is an equality check, the latter is a policy decision.

Note that NSMutableSet is a class cluster. Class NSMutableSet itself does not implement any storage. If you want to subclass NSMutableSet, you'll need to implement the storage and all of the core methods from NSSet and NSMutableSet yourself.

Note that NSSet and NSMutableSet define set member equality as -isEqual:. Violating that in a subclass may break other code.


--
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

References: 
 >ARC + CF types (From: Thomas Davie <email@hidden>)
 >Re: ARC + CF types (From: Dave Zarzycki <email@hidden>)
 >Re: ARC + CF types (From: Thomas Davie <email@hidden>)
 >Re: ARC + CF types (From: Dave Zarzycki <email@hidden>)

  • Prev by Date: Re: Blocked in NSFileCoordinator
  • Next by Date: Re: Large over 100K pixel high ruler scroll view
  • Previous by thread: Re: ARC + CF types
  • Next by thread: Re: ARC + CF types
  • Index(es):
    • Date
    • Thread