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 --- Creating a reference to a variable is called borrowing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Creating a reference to a variable is called borrowing.md') diff --git a/Creating a reference to a variable is called borrowing.md b/Creating a reference to a variable is called borrowing.md index 245d060..2790d63 100644 --- a/Creating a reference to a variable is called borrowing.md +++ b/Creating a reference to a variable is called borrowing.md @@ -8,6 +8,6 @@ Creating a reference is done with an ampersand. It creates a pointer to another variable in the stack, which could be a pointer to something on the heap. -This is called borrowing. +This is called borrowing. ( Borrow, but not own, its heap data so to speak? ) A reference is a non-owning pointer; so if we create a reference to a Box we can safely have it discarded and continue using the box because the heap data is not deallocated. \ No newline at end of file -- cgit v1.2.3