# std::function<R(Args...)>::~function

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

Destroys the std::function instance. If the std::function is not empty, its target is destroyed also.

## Official Specification Summary (cppreference)

```cpp
~function(); // (since C++11)
```

Destroys the `std::function` instance. If the `std::function` is not *empty*, its *target* is destroyed also.

### See also

- [(destructor)](https://en.cppreference.com/w/cpp/utility/functional/move_only_function/~move_only_function): destroys a `std::move_only_function` object (public member function of `std::move_only_function`)

---
Attribution: content from https://en.cppreference.com/w/cpp/utility/functional/function/~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.