0
0

fix memory leak by closing batches in batchRows()

This commit is contained in:
Steve Yen 2016-01-07 17:59:37 -08:00
parent 70105477cf
commit 860de28a28
2 changed files with 6 additions and 0 deletions

View File

@ -194,6 +194,9 @@ func (f *Firestorm) batchRows(writer store.KVWriter, rowsOfRows [][]index.IndexR
// prepare batch
wb := writer.NewBatch()
defer func() {
_ = wb.Close()
}()
var kbuf []byte
var vbuf []byte

View File

@ -139,6 +139,9 @@ func (udc *UpsideDownCouch) batchRows(writer store.KVWriter, addRows []UpsideDow
// prepare batch
wb := writer.NewBatch()
defer func() {
_ = wb.Close()
}()
// buffer to work with
rowBuf := GetRowBuffer()