std::pmr::u...rce::release(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

🌸 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 of std::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