When are object locks released?

An object lock exists until the sandbox that holds the lock is published or deleted. A lock is not removed when the change that caused the lock is deleted or reverted.

For example, adding a new page layout creates a lock on an object if the object is not already locked, but deleting the layout will not release the lock.