summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-19 22:48:04 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-19 22:48:04 +0000
commit23065ddf6ed0b3762dda5f5059888eb52b5c2415 (patch)
treeaec187b8211203081e8dacb07a5ce325eb348cc4 /docs
parent3af5dcf34d705cc52c1ffe5b85c2a90b5104e4c9 (diff)
Fixes related to memory safety. I will work more on this related to the stdlib.
Diffstat (limited to 'docs')
-rw-r--r--docs/std/vec.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/std/vec.md b/docs/std/vec.md
index a0422bb..bda8d5b 100644
--- a/docs/std/vec.md
+++ b/docs/std/vec.md
@@ -87,4 +87,5 @@ struct Vec<T> {
| Method | Signature | Description |
| :--- | :--- | :--- |
| **Free** | `free(self)` | Manually frees memory. Safe to call multiple times. |
+| **Forget** | `forget(self)` | Detaches the memory buffer from the vector (sets fields to 0). Prevents `Drop` from freeing memory. Useful for implementing move semantics or transferring ownership. |
| **Trait** | `impl Drop for Vec` | Automatically calls `free()` when `Vec` goes out of scope. |