Safety self-locking cylinder