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:
parent
885a41a0a6
commit
b858ec296c
1
pool.go
1
pool.go
@ -23,6 +23,7 @@ func (cfg *frozenConfig) BorrowStream(writer io.Writer) *Stream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (cfg *frozenConfig) ReturnStream(stream *Stream) {
|
func (cfg *frozenConfig) ReturnStream(stream *Stream) {
|
||||||
|
stream.out = nil
|
||||||
stream.Error = nil
|
stream.Error = nil
|
||||||
stream.Attachment = nil
|
stream.Attachment = nil
|
||||||
cfg.streamPool.Put(stream)
|
cfg.streamPool.Put(stream)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user