A
lock is an object that holds a reference to a lockable object and may unlock the
lockable object during the lock's destruction (such as when leaving block scope)
. An execution
agent may use a lock to aid in managing ownership of a lockable object in an exception safe
manner
. A lock is said to
own a lockable object if it is currently managing the
ownership of that lockable object for an execution agent
. A lock does not manage the lifetime
of the lockable object it references
. [
Note 1:
Locks are intended to ease the burden of
unlocking the lockable object under both normal and exceptional circumstances
. —
end note]