Adding Strings to NsMutableSets
问题 If I have two string objects that both have value "hi", and I add them to an NSMutableSet, are they treated as different objects or not? Thanks a bunch! 回答1: Beside the correct comment of @rmaddy, there is a fundamental problem with it: It is simply mostly impossible to guarantee that no objects are equal in a set. (It is easy to guarantee that the are not identical.) This would imply to recheck the equaty of all objects (expensive), when one changes (mostly impossible to detect). This is,