mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-23 05:54:59 +02:00
parent
1b38979a0a
commit
0ca16b6fea
@ -16,7 +16,7 @@ Static memory management at compile time:
|
|||||||
It is possible to produce memory leaks in (safe) Rust. Some examples
|
It is possible to produce memory leaks in (safe) Rust. Some examples
|
||||||
are:
|
are:
|
||||||
|
|
||||||
* You can for use [`Box::leak`] to leak a pointer. A use of this could
|
* You can use [`Box::leak`] to leak a pointer. A use of this could
|
||||||
be to get runtime-initialized and runtime-sized static variables
|
be to get runtime-initialized and runtime-sized static variables
|
||||||
* You can use [`std::mem::forget`] to make the compiler "forget" about
|
* You can use [`std::mem::forget`] to make the compiler "forget" about
|
||||||
a value (meaning the destructor is never run).
|
a value (meaning the destructor is never run).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user