# std::unique_lock<Mutex>::release

> C++ Atlas: `cppatlas.com/w/cpp/thread/unique_lock/release` | Source: https://en.cppreference.com/w/cpp/thread/unique_lock/release | Domain: Concurrency support | Standards: C++11

Breaks the association of the associated mutex, if any, and *this.

## Official Specification Summary (cppreference)

```cpp
mutex_type* release() noexcept; // (since C++11)
```

Breaks the association of the associated mutex, if any, and `*this`.

No locks are unlocked. If `*this` held ownership of the associated mutex prior to the call, the caller is now responsible to unlock the mutex.

### Parameters

(none)

### Return value

Pointer to the associated mutex or a null pointer if there was no associated mutex.

### Example

> Note: This section is incomplete Reason: no example

### See also

- [`unlock`](https://en.cppreference.com/w/cpp/thread/unique_lock/unlock): unlocks (i.e., releases ownership of) the associated mutex (public member function)

---
Attribution: content from https://en.cppreference.com/w/cpp/thread/unique_lock/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.