# std::move_only_function::~move_only_function

> C++ Atlas: `cppatlas.com/w/cpp/utility/functional/move_only_function/~move_only_function` | Source: https://en.cppreference.com/w/cpp/utility/functional/move_only_function/~move_only_function | Domain: Utility | Standards: C++23

Destroys the std::move_only_function object. If the std::move_only_function is not empty, its target is also destroyed.

## Official Specification Summary (cppreference)

```cpp
~move_only_function(); // (since C++23)
```

Destroys the `std::move_only_function` object. If the `std::move_only_function` is not empty, its target is also destroyed.

### See also

- [(destructor)](https://en.cppreference.com/w/cpp/utility/functional/function/~function): destroys a `std::function` instance (public member function of `std::function<R(Args...)>`)

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