Locking on a object