The three orange cells are where B wrote; the two blue cells are what's left of alice Same array, read again: user=bobce bad is still a slice of length 10 A writes · bad := b.Bytes() u s e r = a l i c e B resets, writes user=bob · len 8 u s e r = b o b c e A reads bad again · len 10 u s e r = b o b c e B's bytesalice's tail Go · ConceptsGo sync.Pool and buffer reuseafter Put, Bytes() isn't yoursIn the previous post, total allocations stayed at 256MiB however I set GOGC and GOMEMLIMIT. Reusing short-lived buffers with sync.Pool is one way to shrink it.Sep 29, 2026