std::pmr::m..._deallocate(3)
π NAME π
std::pmr::monotonic_buffer_resource::do_deallocate β ok so this is literally std::pmr::monotonic_buffer_resource::do_deallocate, bestie, that's the whole name, no notes π
β¨ Synopsis β¨
virtual void do_deallocate( void* p, std::size_t bytes, std::size_t alignment );
this one's been around since C++17 π«Ά
So here's the tea: this function has no effect. Like, none. Zero. It does nothing and it's not even sorry about it π
And honestly? That's kind of the whole point. Memory used by a monotonic_buffer_resource β as its name indicates β increases monotonically until the resource is destroyed. Monotonic. It only ever goes up π The way that deallocation simply is not on the agenda. It's giving "we don't do that here" energy and we respect it π
π Exceptions
Throws nothing. Not a single exception. Iconic, honestly. Immaculate behaviour, no cap β¨
πΈ See also
deallocateβ deallocates memory (public member function ofstd::pmr::memory_resource)do_deallocateβ deallocates memory[virtual](virtual private member function ofstd::pmr::memory_resource)
and that's the whole page diva π This little number comes to you from http://cppreference.com, dated 2024.06.10, filed under the C++ Standard Libary (yes, that's their spelling, I'm not fixing it π) β mwah, go allocate something πβπ
π¦ 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