Closed jiaoji100 closed 5 years ago
when I use delete map[somekey] in my code, I find that golang will not delete the key, but mark the key as empty instead.
Here are my questions: when a key was marked as empty, golang’gc will not free the memory? This map may cause memory leak, Is that reasonable?
I think this is more about Go's builtins than go-cache. It seems like there's a relevant issue here: https://github.com/golang/go/issues/20135
when I use delete map[somekey] in my code, I find that golang will not delete the key, but mark the key as empty instead.
Here are my questions: when a key was marked as empty, golang’gc will not free the memory? This map may cause memory leak, Is that reasonable?