Close closes the decoder for further use and puts it back in the decoder pool
()
| 57 | |
| 58 | // Close closes the decoder for further use and puts it back in the decoder pool |
| 59 | func (d *Decoder) Close() { |
| 60 | readers.Put(d.rd) |
| 61 | d.rd = nil |
| 62 | decoders.Put(d) |
| 63 | } |
| 64 | |
| 65 | func NewDecoder(rd io.Reader) *Decoder { |
| 66 | dc := decoders.Get().(*Decoder) |