Cloning and ID Map

The ID map is the mechanism for keeping track of a clone operation. The map consists of pairs of object IDs—the ID of the source object (referred to as the “key ID”) and the ID of the cloned, or destination, object (referred to as the “value ID”). The ID map also contains additional ID pairs of noncloned objects that are needed for ID translation (see Translation Phase).

When deepCloneObjects() is called on certain objects, additional objects are cloned because of their ownership connection to the primary set of cloned objects. You can look at the ID map to see what additional objects were cloned.