mirror of
https://github.com/vlang/v.git
synced 2025-09-17 11:26:17 -04:00
docs: fix minor typos in the memory management section (#22151)
This commit is contained in:
parent
b898987ece
commit
0a61b4a076
@ -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]
|
||||
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user