I always hesitant about child classes that have pointers to their owners. It feels like the structure is wrong.

In this case I think it would be clearer if
i) this class didn't have owner
ii) the lock was passed to closeConnection(), which then called lock.clear()