I was trying to understand the memory leaks in my application, and saw memory allocations from TLS were not freed - Several go routines pointing to memory allocated inside TLS section
created by net/http.(*persistConn).addTLS
I wrote small code to understand this https://play.golang.org/p/om0A-gkJzFt.
On executing this code with
GODEBUG=allocfreetrace=1 env enabled I noted that memory dump had all
tracefree was not called even after application terminated.
Am I missing some step here? Or there is a memory leak in basic application code as well?