Change-Id: I0360d294868ec4423e4ae036009fac4e72425c9c
Reviewed-on: https://go-review.googlesource.com/59152
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
if k.str != key.str && !memequal(k.str, key.str, uintptr(key.len)) {
continue
}
- *(*string)(kptr) = ""
+ // Clear key's pointer.
+ k.str = nil
// Only clear value if there are pointers in it.
if t.elem.kind&kindNoPointers == 0 {
v := add(unsafe.Pointer(b), dataOffset+bucketCnt*2*sys.PtrSize+i*uintptr(t.valuesize))