aboutsummaryrefslogtreecommitdiff
path: root/absl/base/no_destructor.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix absl::NoDestructor documentation about its use as a globalDerek Mauro2024-06-271-31/+25
| | | | | | | | | It is not possible to have a constant-initialized object of type absl::NoDestructor<T>. Fix the documentation so that it doesn't mention this possibility. Only recommend it use as a function-scope static variable, and discourage its use as a global variable. PiperOrigin-RevId: 647488395 Change-Id: Ifee052fce07609d3de72cddc30e86de67706cd91
* [absl] Mark `absl::NoDestructor` methods with `absl::Nonnull` as appropriateLawrence Wolf-Sonkin2024-02-291-9/+10
| | | | | | | | * It is stated in prose that the methods on `absl::NoDestructor` can never return a null pointer * Now this is annotated via nullability annotations as well PiperOrigin-RevId: 611619075 Change-Id: I078a5628430b7b221c009a5dcb849efe30409c28
* Minor documentation updates.Abseil Team2024-02-211-1/+1
| | | | | PiperOrigin-RevId: 609064443 Change-Id: Ifaeb53ae2d50bcef1ef6f67e662173b59c3fb8a2
* Add absl::NoDestructor<T>Derek Mauro2023-11-081-0/+217
absl::NoDestructor<T> wraps an existing type and is used for defining a static type that does not need to be destructed upon program exit. Instead, such an object survives during program exit, and can be safely accessed at any time after construction. PiperOrigin-RevId: 580566259 Change-Id: I2cbb4cd9f6b50b98a793acd2ef0a4befd541f17f