A true deep copy creates copies of everything up to the link tree.
If B is a deep copy of A, any changes you make to A will not be visible through B.
Most deep copy algorithms did not notice that in your example all three members of people are links to the same person . A typical deep copy algorithm will create three new Person objects.
However, this is not all that usually happens to see a true deep copy, because it is difficult to program reliable (with the exception of very strictly defined data structures) and expensive at runtime.
source share