Skip to content

Commit

Permalink
docs: fix minor typos in the memory management section (#22151)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimshrier authored Sep 3, 2024
1 parent b898987 commit 0a61b4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4851,7 +4851,7 @@ Just as the compiler frees C data types with C's `free()`, it will statically in
Autofree can be enabled with an `-autofree` flag.

For developers willing to have more low level control, autofree can be disabled with
`-manualfree`, or by adding a `[manualfree]` on each function that wants manage its
`-manualfree`, or by adding a `[manualfree]` on each function that wants to manage its
memory manually. (See [attributes](#attributes)).

> [!NOTE]
Expand Down Expand Up @@ -4963,7 +4963,7 @@ Here `a` is stored on the stack since its address never leaves the function `f()
However a reference to `b` is part of `e` which is returned. Also a reference to
`c` is returned. For this reason `b` and `c` will be heap allocated.

Things become less obvious when a reference to an object is passed as function argument:
Things become less obvious when a reference to an object is passed as a function argument:

```v
struct MyStruct {
Expand Down

0 comments on commit 0a61b4a

Please sign in to comment.