# Questions on TLogData

**URL:** <https://forums.foundationdb.org/t/questions-on-tlogdata/2951>\
**Category:** FoundationDB Core\
**Created:** [October 17, 2021, 8:47am UTC](https://forums.foundationdb.org/t/questions-on-tlogdata/2951 "2021-10-17T08:47:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![superhail](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/superhail/32/1191_2.png) [@superhail](https://forums.foundationdb.org/u/superhail)\
**Post date:** [October 17, 2021, 8:47am UTC](https://forums.foundationdb.org/t/questions-on-tlogdata/2951/1 "2021-10-17T08:47:06Z")

</div>

According on [link](https://github.com/apple/foundationdb/blob/0e4a6cc92101fdaf008e68f662316f52836f0c58/fdbserver/TLogServer.actor.cpp#L375), it seems that memory for this `TLogQueue` is never released, is this a memory leak?  
And also this [one](https://github.com/apple/foundationdb/blob/0e4a6cc92101fdaf008e68f662316f52836f0c58/fdbserver/worker.actor.cpp#L1500).

---

<div class="post-metadata">

**Author:** ![markus.pilman](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/markus.pilman/32/379_2.png) [@markus.pilman](https://forums.foundationdb.org/u/markus.pilman)\
**Post date:** [October 17, 2021, 5:44pm UTC](https://forums.foundationdb.org/t/questions-on-tlogdata/2951/2 "2021-10-17T17:44:06Z")

</div>

This is handled in `tlogTerminated` which you can find [here](https://github.com/apple/foundationdb/blob/0e4a6cc92101fdaf008e68f662316f52836f0c58/fdbserver/TLogServer.actor.cpp#L3077). 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).
