Skip to content

Instantly share code, notes, and snippets.

@mattjgalloway
Created November 28, 2014 10:36
Show Gist options
  • Save mattjgalloway/e373c9af05070154a473 to your computer and use it in GitHub Desktop.
Save mattjgalloway/e373c9af05070154a473 to your computer and use it in GitHub Desktop.
Objects that are isEqual: should have the same hash
(lldb) p (int) [0x7d35ec40 hash]
(int) $14 = 16406
(lldb) p (int) [0x79bef090 hash]
(int) $15 = 22
(lldb) p (BOOL) [0x79bef090 isEqual:0x7d35ec40]
(BOOL) $16 = YES
(lldb) p (BOOL) [0x7d35ec40 isEqual:0x79bef090]
(BOOL) $19 = YES
(lldb) po 0x7d35ec40
<NSIndexPath: 0x7d35ec40> {length = 2, path = 0 - 1}
(lldb) po 0x79bef090
<UIMutableIndexPath 0x79bef090> 2 indexes [0, 1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment