summaryrefslogtreecommitdiff
path: root/Clone a reference in a function to modify it.md
blob: 73590f0c2dae26d485679ba81dbc242fb841ce28 (plain)
1
2
3
[[Cloning a box does a deep copy of the heap data]]

To be able to safely modify the heap value of a reference passed to a function we can clone it's heap value. This can be expensive.