Rollup merge of #135556 - AeonSolstice:patch-1, r=tgross35
Clarify note in `std::sync::LazyLock` example I doubt most people know what it means, as I did not until a week ago. In the current form, it seems like a `TODO:`.
This commit is contained in:
commit
dbbbed0579
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ union Data<T, F> {
|
|||
/// ```
|
||||
/// use std::sync::LazyLock;
|
||||
///
|
||||
/// // n.b. static items do not call [`Drop`] on program termination, so this won't be deallocated.
|
||||
/// // Note: static items do not call [`Drop`] on program termination, so this won't be deallocated.
|
||||
/// // this is fine, as the OS can deallocate the terminated program faster than we can free memory
|
||||
/// // but tools like valgrind might report "memory leaks" as it isn't obvious this is intentional.
|
||||
/// static DEEP_THOUGHT: LazyLock<String> = LazyLock::new(|| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue