]> Cypherpunks repositories - gostls13.git/commit
io: document that Readers and Writers must not retain buffers
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 26 Aug 2014 04:38:39 +0000 (21:38 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 26 Aug 2014 04:38:39 +0000 (21:38 -0700)
commit87b452537a599522cb155592f1f24bfc8a956e4c
treecc10d85bb2680999502589fa1cf9be69bf987fd3
parent3c466dfea4db91202ec397502f50d119e0d72d47
io: document that Readers and Writers must not retain buffers

There are both many callers and many implementations of these
interfaces, so make the contract explicit. Callers generally
assume this, and at least the standard library and other
implementations obey this, but it's never stated explicitly,
making it somewhat risky to assume.

LGTM=gri, rsc
R=golang-codereviews, gri
CC=golang-codereviews, r, rsc
https://golang.org/cl/132150043
src/pkg/io/io.go