std::pmr::u...rce::release(3)
πΈ NAME πΈ
std::pmr::unsynchronized_pool_resource::release β okay bestie, this is the glow-up page for the release member function, and yes, it's from the C++ Standard Libary manual (their spelling, not mine π
).
β¨ Synopsis β¨
void release(); (since C++17)
So here's the tea: release() releases, like, all the memory owned by this resource. It does that by calling the deallocate function of the upstream memory resource as needed. Iconic cleanup behavior, honestly.
And the important part, no cap: memory is released back to the upstream resource even if deallocate has not been called for some of the allocated blocks. The way that this function just handles it anyway? Obsessed. π«Ά
π See also π
deallocateβ deallocates memory (public member function ofstd::pmr::memory_resource)
bestie reminder: this is the std::pmr::u...rce::release(3) page, and it's giving "allocator cleanup with main character energy." π
mwah π this lil page came from http://cppreference.com, dated 2024.06.10, and that's the whole cute sign-off β periodt. π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms