Deep Copy involving References:
- Last UpdatedJan 08, 2024
- 1 minute read
Where !Y is an array or object:
!X = !Y
will make a deep copy of !Y. However, if any of the array elements is a reference (for example, to a gadget or DB element), a copy is made of the reference, but not of the object it refers to. In other words a deep copy stops copying when it reached a reference.