# std::auto_ptr<T>::release

> C++ Atlas: `cppatlas.com/w/cpp/memory/auto_ptr/release` | Source: https://en.cppreference.com/w/cpp/memory/auto_ptr/release | Domain: Memory management | Standards: C++17

Releases the held pointer. After the call *this holds the null pointer.

## Official Specification Summary (cppreference)

```cpp
T* release() throw(); // (deprecated in C++11) (removed in C++17)
```

Releases the held pointer. After the call `*this` holds the null pointer.

### Parameters

(none)

### Return value

`get()`.

### See also

- [`reset`](https://en.cppreference.com/w/cpp/memory/auto_ptr/reset): replaces the managed object (public member function)

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