1
0
mirror of https://github.com/json-iterator/go.git synced 2025-05-28 22:17:38 +02:00

Release writer to enable GC

This commit is contained in:
Mikhail Mazurskiy 2018-04-07 21:40:08 +10:00
parent 885a41a0a6
commit b858ec296c

View File

@ -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)