Documentation Home >> Headers >> <mutex> Header >> std::unique_lock >> std::unique_lock Destructor

Destroys a std::unique_lock instance and unlocks the corresponding mutex if it is owned by the destroyed instance.

~unique_lock();

Effects:

If this->owns_lock() would return true, calls this->mutex()->unlock().

Throws:

Nothing.

Header

#include <mutex>

See Also