mirror of
https://github.com/json-iterator/go.git
synced 2025-04-23 11:37:32 +02:00
Merge pull request #257 from ash2k/release-writer
Release writer to enable GC
This commit is contained in:
commit
f89479f5c0
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