# std::experimental::unique_resource<R, D>::~unique_resource

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

Disposes the resource by calling the deleter with the underlying resource handle if the unique_resource owns it, equivalent to calling reset().

## Official Specification Summary (cppreference)

```cpp
~unique_resource(); // (library fundamentals TS v3)
```

Disposes the resource by calling the deleter with the underlying resource handle if the `unique_resource` owns it, equivalent to calling `reset()`. Then destroys the stored resource handle and the deleter.

### See also

- [`reset`](https://en.cppreference.com/w/cpp/experimental/unique_resource/reset): disposes or replaces the managed resource (public member function)
- [(destructor)](https://en.cppreference.com/w/cpp/memory/unique_ptr/~unique_ptr): destructs the managed object if such is present (public member function of `std::unique_ptr<T,Deleter>`)

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