From 22675cd8dc75d8b8d4b0f818f5b093efbc364802 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Fri, 8 Aug 2025 22:44:15 +0200 Subject: vault backup: 2025-08-08 22:44:15 --- Clone a reference in a function to modify it.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Clone a reference in a function to modify it.md (limited to 'Clone a reference in a function to modify it.md') diff --git a/Clone a reference in a function to modify it.md b/Clone a reference in a function to modify it.md new file mode 100644 index 0000000..73590f0 --- /dev/null +++ b/Clone a reference in a function to modify it.md @@ -0,0 +1,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. \ No newline at end of file -- cgit v1.2.3