agressively cleanup references at release

pull/109/head
v2ray 9 years ago
parent a341cab302
commit 1b5b599741

@ -22,6 +22,8 @@ func NewBufferedReader(rawReader io.Reader) *BufferedReader {
func (this *BufferedReader) Release() {
this.buffer.Release()
this.buffer = nil
this.reader = nil
}
func (this *BufferedReader) Cached() bool {

@ -60,4 +60,6 @@ func (this *BufferedWriter) SetCached(cached bool) {
func (this *BufferedWriter) Release() {
this.buffer.Release()
this.buffer = nil
this.writer = nil
}

Loading…
Cancel
Save