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.
It is perhaps easiest if I go through the conditions which must be met for
data to be reclaimed by the Operating System:
First, the data must be unreachable by goroutines through a path of
pointers. When you nil the object, you break such a path, but you must make
sure there are no other such