std::experi...::deallocate(3)

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

✨ NAME ✨

okay so bestie, this page is std::experi...::deallocate(3), and it lives in the C++ Standard Libary manual. The full main-character name is std::experimental::pmr::polymorphic_allocator::deallocate, and it is literally the deallocate member you came here for. πŸ’…


🌸 Synopsis 🌸

void deallocate( T* p, std::size_t n );  (library fundamentals TS)

It deallocates the storage pointed to by p, which must have been allocated from a memory_resource x that compares equal to *resource() using x.allocate(n * sizeof(T), alignof(T)).

Equivalent to this:

this->resource()->deallocate(p, n * sizeof(T), alignof(T));

periodt. πŸ’–


πŸŽ€ Parameters πŸŽ€

  • p β€” pointer to memory to deallocate
  • n β€” the number of objects originally allocated

πŸ¦‹ Exceptions πŸ¦‹

Throws nothing. literally nothing. no drama, no throw. ✨


πŸ’œ See also πŸ’œ

  • deallocate β€” deallocates storage using the allocator [static] (public static member function of std::allocator_traits<Alloc>)
  • deallocate β€” deallocates memory (public member function of std::experimental::pmr::memory_resource)

🌈 Category 🌈

  • Noindexed pages

source/version: http://cppreference.com, date: 2024.06.10, page: std::experi...::deallocate(3) β€” mwah, love u, bye πŸ’‹πŸŽ€

πŸ“¦ where this page comes from