Commit 50bef003 authored by Geoff Simmons's avatar Geoff Simmons

Clean up dataMap entry on Release().

parent 3a7b4c8a
......@@ -405,6 +405,19 @@ func (stats *Stats) Release() {
// ignoring nil check errors
_ = stats.vsm.Destroy()
}
if stats.dataIdx == -1 {
return
}
dataLock.Lock()
data, ok := dataMap[stats.dataIdx]
if !ok {
dataLock.Unlock()
panic("unmapped stats data")
}
data.names = nil
data.d9ns = nil
delete(dataMap, stats.dataIdx)
dataLock.Unlock()
}
//export point
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment