Locking for deleting layer connections, files.