I am new to golang, and I made a function which returns a map, but I do not know if it will cause a memory leak. the code like below
func ParseParams(data string) map[string]string {
params := strings.Split(data, "&")
m := make(map[string]string)
for idx := range params {
vals := strings.Split(params[idx], "=")
m[vals[0]] = vals[1]
}
return m
}
So, I would like to know if it is necessary to release or free the map ? or do something to avoid the memory leak. Thanks!