I'm using jsontext.Encoder and jsontext.Decoder with a sync.Pool. Ideally, I should be able to put the encoder/decoder back into the pool without referencing the memory for the underlying io.Reader and io.Writer. Unfortunately, calling Reset(nil) panics. We should permit nil and just allow subsequent method calls to panic.
I'm using
jsontext.Encoderandjsontext.Decoderwith async.Pool. Ideally, I should be able to put the encoder/decoder back into the pool without referencing the memory for the underlyingio.Readerandio.Writer. Unfortunately, callingReset(nil)panics. We should permit nil and just allow subsequent method calls to panic.