|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
(C++20/26*) | ||||
polymorphic_allocator::deallocate_bytes (C++20) | ||||
| Non-member functions | ||||
(until C++20) |
void deallocate_bytes(void* p, std::size_t nbytes, | (since C++20) | |
Deallocates the storage pointed to byp, which must have been allocated from astd::pmr::memory_resourcex that compares equal to*resource(), usingx.allocate(nbytes, alignment), typically through a call toallocate_bytes(nbytes, alignment).
Equivalent toresource()->deallocate(p, nbytes, alignment);.
Contents |
| p | - | pointer to memory to deallocate |
| nbytes | - | the number of bytes originally allocated |
| alignment | - | the alignment originally allocated |
Throws nothing.
This function was introduced for use with the fully-specialized allocatorstd::pmr::polymorphic_allocator<>, but it may be useful in any specialization.
(C++20) | frees raw memory obtained byallocate_object(public member function)[edit] |
(C++20) | destroys and deallocates an object (public member function)[edit] |
[static] | deallocates storage using the allocator (public static member function of std::allocator_traits<Alloc>)[edit] |
| deallocates memory (public member function of std::pmr::memory_resource)[edit] |