Object identity (source code)

= Object identity

The identity of a particular allocated object, distinct from equality of its current fields. Two different <linked list nodes> can store identical payloads, while two references can designate the same node. Pointer algorithms must state whether they preserve identities, copy payloads or allocate replacements. Testing cycle completion by identity avoids confusing two equal-looking nodes.