# std::experimental::pmr::polymorphic_allocator<T>::destroy

> C++ Atlas: `cppatlas.com/w/cpp/experimental/polymorphic_allocator/destroy` | Source: https://en.cppreference.com/w/cpp/experimental/polymorphic_allocator/destroy | Domain: Technical specifications

Destroys the object pointed to by p, as if by calling p->~U().

## Official Specification Summary (cppreference)

```cpp
template< class U >
void destroy( U* p ); // (library fundamentals TS)
```

Destroys the object pointed to by `p`, as if by calling `p->~U()`.

### Parameters

- `p` - pointer to the object being destroyed

### See also

- [`destroy`](https://en.cppreference.com/w/cpp/memory/allocator_traits/destroy) [static]: destructs an object stored in the allocated storage (function template)

---
Attribution: content from https://en.cppreference.com/w/cpp/experimental/polymorphic_allocator/destroy (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.