This is handled in
tlogTerminated which you can find here. The only way the
tlog actor ever can exit is through a transaction.
tlogTerminated will check whether the tlog was removed (in which case it will dispose it) or whether it exits for another reason (in which case it will close the queue).