What is the NSObject isEqual: and hash default function?
问题 I have a database model class that is a NSObject . I have a set of these objects in a NSMutableArray . I use indexOfObject: to find a match. Problem is the model object's memory address changes. So I am overriding the hash method to return the model's row ID. This however does not fix it. I also have to override the isEqual: method to compare the value of the hash method. What does the isEqual: method use to determine equality by default? I'm assuming it uses the memory address. After reading