Skip to content

Commit 1c69e4c

Browse files
mehrdadadfawley
authored andcommitted
Eagerly set a pointer to nil to help GC (#1232)
1 parent 780308d commit 1c69e4c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

transport/transport.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ func (b *recvBuffer) load() {
105105
if len(b.backlog) > 0 {
106106
select {
107107
case b.c <- b.backlog[0]:
108+
b.backlog[0] = nil
108109
b.backlog = b.backlog[1:]
109110
default:
110111
}

0 commit comments

Comments
 (0)