Delete channel in a try block. Release lock in a finally block.