Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::pmr::polymorphic_allocator<T>::delete_object

      From cppreference.com
      <cpp‎ |memory‎ |polymorphic allocator
       
       
      Memory management library
      (exposition only*)
      Allocators
      Uninitialized memory algorithms
      Constrained uninitialized memory algorithms
      Memory resources
      Uninitialized storage(until C++20)
      (until C++20*)
      (until C++20*)
      Garbage collector support(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
       
       
      template<class U>
      void delete_object( U* p);
      (since C++20)

      Destroys the object of typeU and deallocates storage allocated for it.

      Equivalent to
      std::allocator_traits<polymorphic_allocator>::destroy(*this, p);
      deallocate_object(p);

      Contents

      [edit]Parameters

      p - pointer to the object to destroy and deallocate

      [edit]Exceptions

      Throws nothing.

      [edit]Notes

      This function was introduced for use with the fully-specialized allocatorstd::pmr::polymorphic_allocator<>, but it may be useful in any specialization.

      [edit]See also

      free raw memory obtained fromallocate_bytes
      (public member function)[edit]
      frees raw memory obtained byallocate_object
      (public member function)[edit]
      [static]
      deallocates storage using the allocator
      (public static member function ofstd::allocator_traits<Alloc>)[edit]
      deallocates memory
      (public member function ofstd::pmr::memory_resource)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/memory/polymorphic_allocator/delete_object&oldid=155175"

      [8]ページ先頭

      ©2009-2025 Movatter.jp