Fixed SegmentedQueues not being cleaned up on session purge
Segmented queues were closed, but not cleared on session close. This resulted in segments not being returned to the pool, and thus disk-space not being released. The queues were also not removed from the QueuePool, resulting in a memory leak.
Relates #734
Hi @hylkevds thanks for this PR. I would also add unit test on the
unsafequeues.Queueorunsafequeues.QueuePoolto verify that a queue purge or close give back the segments to be reused.
I'll look into making some tests for this.
@andsel: I added a test to verify the queue cleanup and page-file re-use.
Thanks @hylkevds for your contribution to the project!