On Sun, Sep 13, 2020 at 1:42 PM Jesper Louis Andersen < jesper.louis.ander...@gmail.com> wrote:
> Second, garbage collection must run. It runs periodically, but it can take > some time before it does so, and if you check memory usage right after > you've freed up data, it might not have run yet. You can run Go with GC > debug output (env GODEBUG=gctrace=1 ...) to see when it actually runs. > This is a property of using a mark'n'sweep garbage collection strategy as > the memory is scavenged for unreachable data immediately. It is somewhat in > contrast to reference counting methods which will usually free up the > memory quicker. > > Too fast. Memory is NOT scavenged immediately in a mark'n'sweep collector. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAGrdgiXBY37JNZ1FS_QfQc-oqNgbMeOiJWyDRz%2BCJPOzZ09cJw%40mail.gmail.com.