Explorar el Código

Release writer to enable GC

Mikhail Mazurskiy hace 7 años
padre
commit
b858ec296c
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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)