We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67f52e6 commit 0f157e3Copy full SHA for 0f157e3
message.go
@@ -489,8 +489,12 @@ func MultiSegment(b [][]byte) *MultiSegmentArena {
489
// Return this arena to an internal sync.Pool of arenas that can be
490
// re-used. Any time MultiSegment(nil) is called, arenas from this
491
// pool will be used if available, which can help reduce memory
492
-// allocations. Calling Release however is optional; if not done
493
-// the garbage collector will release the memory per usual.
+// allocations.
+//
494
+// All segments will be zeroed before re-use.
495
496
+// Calling Release is optional; if not done the garbage collector
497
+// will release the memory per usual.
498
func (msa *MultiSegmentArena) Release() {
499
for i, v := range *msa {
500
// Clear the memory, so there's no junk in here for the next use:
0 commit comments