3 ms·
No, because you don't copy the whole structure. You create a new partial structure. E.g. let's say you create a map with keys A and B. You then insert a new ke
by rkangel 4y ago
No, because you don't copy the whole structure. You create a new partial structure.
E.g. let's say you create a map with keys A and B. You then insert a new key C. In memory you might have two objects: One is the origi al map with A and B and the other has "Key C and a ref to the first map".