std::pmr::p...lete_object(3)
π NAME π
okay so bestie, welcome to the std::pmr::polymorphic_allocator::delete_object page β whose header is literally std::pmr::p...lete_object(3) β from the C++ Standard Libary manual π
β¨.
std::pmr::polymorphic_allocator::delete_object β std::pmr::polymorphic_allocator::delete_object. yes, the NAME section said it twice, and honestly periodt π.
β¨ Synopsis β¨
here's the signature, bestie β and yes, it's since C++20 because we're fancy like that πΈ:
template< class U > (since C++20)
void delete_object( U* p );
This one destroys the object of type U and deallocates the storage allocated for it. that's the whole assignment, no cap π
.
Equivalent to:
std::allocator_traits<polymorphic_allocator>::destroy(*this, p);
deallocate_object(p);
πΈ Parameters πΈ
pβ pointer to the object to destroy and deallocate. literally the target, bestie π―.
π Exceptions π
Throws nothing. not even a little. the calmest vibes imaginable π«Ά.
π¦ Notes π¦
This function was introduced for use with the fully-specialized allocator std::pmr::polymorphic_allocator<>, but it may be useful in any specialization. iconic range, honestly π.
π See also π
deallocate_bytesβ free raw memory obtained fromallocate_bytes(C++20) (public member function) π§deallocate_objectβ frees raw memory obtained byallocate_object(C++20) (public member function) πdeallocate[static]β deallocates storage using the allocator (public static member function ofstd::allocator_traits<Alloc>) βdeallocateβ deallocates memory (public member function ofstd::pmr::memory_resource) π
mwah π β source/version: http://cppreference.com, date: 2024.06.10. bye bestie, go delete an object with main character energy π«Άπ.
π¦ 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