소스 검색

Release writer to enable GC

Mikhail Mazurskiy 7 년 전
부모
커밋
b858ec296c
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      pool.go

+ 1 - 0
pool.go

@@ -23,6 +23,7 @@ func (cfg *frozenConfig) BorrowStream(writer io.Writer) *Stream {
 }
 
 func (cfg *frozenConfig) ReturnStream(stream *Stream) {
+	stream.out = nil
 	stream.Error = nil
 	stream.Attachment = nil
 	cfg.streamPool.Put(stream)