[#BloombergLP-bslmt-UnLockGuard-2constructor-02]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/UnLockGuard.adoc[UnLockGuard]::UnLockGuard
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bslmt&lowbar;lockguard&period;h&gt;`

Create a guard that unlocks `lock`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bslmt/UnLockGuard/2constructor-0d.adoc[UnLockGuard](T* lock);
----

[.small]#xref:BloombergLP/bslmt/UnLockGuard/2constructor-0d.adoc[_» more&period;&period;&period;_]#

Create a guard that optionally unlocks `lock`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslmt/UnLockGuard/2constructor-0a.adoc[UnLockGuard](
    T* lock,
    bool alreadyUnlockedFlag);
----

[.small]#xref:BloombergLP/bslmt/UnLockGuard/2constructor-0a.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lock*
| lock object to unlock&semi; may be null
| *alreadyUnlockedFlag*
| `true` if `lock` is already unlocked
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
