📝GC only helps with memory but not other resources

Tracing GC only helps with collecting unused memory, however it does not help with collecting other resources—open files, sockets, locks, etc.

Many GCs have finalizers, but there is no guarantee when they are run.

Approaches that help:

  • reference counting
  • RAII

Backlinks

Want to receive my 🖋 posts as I publish them?