check for double release

pull/255/merge
Darien Raymond 8 years ago
parent 538b0720d5
commit 5769df496b
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

@ -85,11 +85,15 @@ func (v *BufferedWriter) SetCached(cached bool) {
}
}
// Release implements common.Releasable.Release().
func (v *BufferedWriter) Release() {
v.Flush()
v.buffer.Release()
v.buffer = nil
if !v.buffer.IsEmpty() {
v.Flush()
}
if v.buffer != nil {
v.buffer.Release()
v.buffer = nil
}
common.Release(v.writer)
}

Loading…
Cancel
Save