mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
021b8c4cff
This is not a complete fix, but the easiest first step. During `db cleanup`, aptly is loading every repo/mirror/... into memory, and even though each object is processed only once, collection holds a reference to all the loaded objects, so they won't be GC'd until process exits. CollectionFactory.Flush() releases pointers to collection objects, making objects egligble for GC. This is not a complete fix, as during iteration we could have tried to release a link to every object being GCed and that would have helped much more.