Re: ARC + CF types
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